MySQL Query Error

From: Date: Mon, 22 Jan 2001 05:01:28 +0000
Subject: MySQL Query Error
Groups: php.general 
Request: Send a blank email to php-general+get-35950@lists.php.net to get a copy of this message
Hi, I have a MySQL statement, namely: SELECT COUNT(*) AS Count FROM images i LEFT JOIN categories c ON i.cat_id=c.id LEFT JOIN subcategories s ON i.subcat_id=s.id I want to change the LEFT JOINs to INNER JOINs like so: SELECT COUNT(*) AS Count FROM images i INNER JOIN categories c ON i.cat_id=c.id INNER JOIN subcategories s ON i.subcat_id=s.id But as soon as I do that I get this error message: MySQL Error: 1064 (You have an error in your SQL syntax near 'INNER JOIN categories c ON i.cat_id=c.id INNER JOIN subcategories s ON i.subcat_' at line 1) Session halted. Help please. Thanks, Matt Stone _______________________________ This email may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you have received this email in error, please contact the sender and delete all copies. Opinions, conclusions or other information expressed or contained in this email are not given or endorsed by the sender unless otherwise affirmed independently by the sender. _________________________________

« previous php.general (#35950) next »