RE: [PHP] MySQL Query Error

From: Date: Mon, 22 Jan 2001 05:23:48 +0000
Subject: RE: [PHP] MySQL Query Error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-35954@lists.php.net to get a copy of this message
No, that is exactly as the PHPLib Debug function is returning... :| -----Original Message----- From: Samantha Savvakis [mailto:samantha@cfs.net.au] Sent: Monday, 22 January 2001 3:21 PM To: Matt Stone Subject: RE: [PHP] MySQL Query Error I'm not sure why are getting that error. Is the statement you are running exactly the same as the one posted in the email? Check that you don't have a "comma" after the "images i" part. If i put a comma there, I can simulate your error. Otherwise, your syntax to me seems fine. > -----Original Message----- > From: Matt Stone [mailto:matt@planetveggie.com] > Sent: Monday, 22 January 2001 15:01 > To: PHP List > Subject: [PHP] MySQL Query Error > > > 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. > > _________________________________ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#35954) next »