This is the relevant join code
I have an additional field in the images table called reference which is NULL if no data so what I would like to do is include in the WHERE sectionPHP Code:$results = @mysql_query('SELECT images.* FROM images LEFT OUTER JOIN works ON images.id = works.imageid LEFT OUTER JOIN artist on images.id = artist.bioimage WHERE works.imageid is NULL and artist.bioimage is NULL order by images.filename');
and images.reference is NULL but that kills the statement and gives zero return....any ideas on how to use it as
CheersPHP Code:$results = @mysql_query('SELECT images.* FROM images LEFT OUTER JOIN works ON images.id = works.imageid LEFT OUTER JOIN artist on images.id = artist.bioimage WHERE works.imageid is NULL and artist.bioimage is NULL and images.reference is NULL order by images.filename');
Alternatively I'd be quite happy to just have images.reference != ""






Bookmarks