sven30
sven30

Reputation: 593

MySQL: error in SQL syntax

I'm attempting to gather/select data from a MySQL table to check it against new data in a cSV file and then update it. I'm stuck on the selecting the data portion of the script.

Here's the error message:

Error at line 44 in /home/atkelect/public_html/test/ap/import_list.php 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 'FROM products WHERE products_model = 'A040503'' at line 1

SELECT products_id, list_price, FROM products WHERE products_model = 'A040503'

[TEP STOP]

Here's line 44:

  $product_query = tep_db_query("SELECT products_id, list_price, FROM ".TABLE_PRODUCTS." WHERE     products_model = '".tep_db_input($line[0])."'");

Upvotes: 0

Views: 74

Answers (1)

Nico
Nico

Reputation: 473

Remove the Comma after list_price, should be like this

SELECT products_id, list_price FROM...

Upvotes: 7

Related Questions