Joins aren't nested like that, unless you use a subquery. I think you just need to remove the parens around the second join.
For better help: 1. show the real SQL -- echo the statement. Most people here don't like looking at app code because your variables could contain anything. 2. Give the exact error message 3. If there's no error, explain what you expect and what you're getting 4. Include table schema 5. Explain what you're trying to accomplish. Regards, Gavin Towey -----Original Message----- From: Victor Subervi [mailto:victorsube...@gmail.com] Sent: Thursday, October 01, 2009 1:34 PM To: mysql@lists.mysql.com Subject: Nested Joins Hi; I'm new to join statements. Here's my python syntax: cursor.execute('select * from %s left join products on %s.Item=products.Item (left join categories on products.Category=categories.ID);' % (client, client)) I believe it's clear how I want to nest, but I don't know how to repair my syntax. TIA, V The information contained in this transmission may contain privileged and confidential information. It is intended only for the use of the person(s) named above. If you are not the intended recipient, you are hereby notified that any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org