Can anyone please help with this?
when i run the following query, using SELECT*,
SELECT *
FROM tbl_artwork, tbl_artworkmedi um, tbl_medium
WHERE tbl_artwork.art workID = tbl_artworkmedi um.artworkID
AND tbl_artworkmedi um.mediumID = tbl_medium.medi umID
AND `dateCreated` =2002
I get more info than i need, (lots of IDs displaying) and type displays oil or watercolour etc. but when i try to get rid of the extra info by running a query which individually specifies the fields, the 'type' shows up as 'type' instead of content of type field. Hope I'm explaining this ok....
SQL-query:
SELECT `title` , `category` , `cost` , `image` , `size` , `paintedOn` , 'type', `dateCreated`
FROM tbl_artwork, tbl_artworkmedi um, tbl_medium
WHERE tbl_artwork.art workID = tbl_artworkmedi um.artworkID
AND tbl_artworkmedi um.mediumID = tbl_medium.medi umID
AND `forSale` = 'Yes'
this is the result:
title category cost image size paintedOn type dateCreated
Abstract Blue 1 Abstract 250 2000*2500mm canvas type 2001
Abstract Blue 2 Abstract 250 2500*2000mm canvas type 2001
Abstract multi 2 Abstract 290 3000*3000mm canvas type 2002
Abstract Multi 3 Abstract 280 3000*3000mm canvas type 2001
Abstract Multi 6 Abstract 310 3000*2800mm canvas type 2001
Abstract Multi 7 Abstract 290 3000*3000mm canvas type 2002
( i know the above query is to pull through different info than the first, but it's just to illustrate my problem) type is the only field in tblMedium other than the PK.
thanks,
Diz
when i run the following query, using SELECT*,
SELECT *
FROM tbl_artwork, tbl_artworkmedi um, tbl_medium
WHERE tbl_artwork.art workID = tbl_artworkmedi um.artworkID
AND tbl_artworkmedi um.mediumID = tbl_medium.medi umID
AND `dateCreated` =2002
I get more info than i need, (lots of IDs displaying) and type displays oil or watercolour etc. but when i try to get rid of the extra info by running a query which individually specifies the fields, the 'type' shows up as 'type' instead of content of type field. Hope I'm explaining this ok....
SQL-query:
SELECT `title` , `category` , `cost` , `image` , `size` , `paintedOn` , 'type', `dateCreated`
FROM tbl_artwork, tbl_artworkmedi um, tbl_medium
WHERE tbl_artwork.art workID = tbl_artworkmedi um.artworkID
AND tbl_artworkmedi um.mediumID = tbl_medium.medi umID
AND `forSale` = 'Yes'
this is the result:
title category cost image size paintedOn type dateCreated
Abstract Blue 1 Abstract 250 2000*2500mm canvas type 2001
Abstract Blue 2 Abstract 250 2500*2000mm canvas type 2001
Abstract multi 2 Abstract 290 3000*3000mm canvas type 2002
Abstract Multi 3 Abstract 280 3000*3000mm canvas type 2001
Abstract Multi 6 Abstract 310 3000*2800mm canvas type 2001
Abstract Multi 7 Abstract 290 3000*3000mm canvas type 2002
( i know the above query is to pull through different info than the first, but it's just to illustrate my problem) type is the only field in tblMedium other than the PK.
thanks,
Diz
Comment