MySQL 4 to MySQL 5 - SQL syntax question.
Hello everyone. I'm helping my company migrate an older php/mysql app to a new machine, and they are upgrading to MySQL 5 from the older MySQL 4. Of course, MySQL 5 requires much more strict syntax, so something like:
...FROM table1, table2 LEFT JOIN table3...
...does not work. i've changed about 30 of these already. I've just got one query left that I'm not sure how I should change it or what it's doing...
SELECT i.cat_id, i.image_name, i.image_media_file, i.image_thumb_file, c.cat_name, u.user_name
FROM IMAGES_TABLE i, CATEGORIES_TABLE c
LEFT JOIN USERS_TABLE u ON u.user_id = i.user_id
WHERE i.image_id = 5
How is table i related to table c? With all the other queries, there was something in the where clause like "i.id = c.id" that obviously linked them together, but not this time. More importantly, how can I rewrite this so that MySQL 5 will accept it?
Thanks for the help.