MySQL Forums
Forum List  »  Newbie

#1064 - You have an error in your SQL syntax.
Posted by: Ukot Ukot
Date: August 25, 2004 12:11PM

I am trying to run a query i wrote in Cold Fusion against mysql database. If i run this query:
FROM Accounts, Customers
Where Accounts.customer_id=Customers.customer_id
AND Customers.customer_id=#session.custid#
AND Accounts.account_id=#session.accid#

I get the following error from the mysql server


SQL-query :

FROM Accounts, Customers
WHERE Accounts.customer_id = Customers.customer_id AND Customers.customer_id = AND Accounts.account_id =
LIMIT 0 , 30

MySQL said:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND Accounts.account_id = LIMIT 0, 30' at line 3

I am sure i am not structuring the query right. Please i need your help ASAP

Options: ReplyQuote

Written By
#1064 - You have an error in your SQL syntax.
August 25, 2004 12:11PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.