Page 1 of 1
Seach help.
Posted: Thu Feb 20, 2003 5:04 pm
by redcircle
I need some help with a search script. mysql.com appears to be down right now. I know I need some left joins but i'm not sure of the syntax I need. Is there a mirror that has the docs?
Posted: Thu Feb 20, 2003 5:45 pm
by redcircle
which is faster
SELECT photofile.id as image_id, photodir.name as dir_name, access.r as read_access FROM photofile left join photodir on (photofile.dir_id = photodir.id) left join access on (photodir.id = access.dir_id) where access.user_id = 0
or
SELECT photofile.id as image_id, photodir.name as dir_name, access.r as read_access FROM photofile,photodir,access where access.user_id = 0 and photofile.dir_id = photodir.id and access.dir_id = photodir.id
both produce same results.
another question.
does it slow the left join statement to use the photofile.id as image_id?