0

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])."'");
0

1 Answer 1

7

Remove the Comma after list_price, should be like this

SELECT products_id, list_price FROM...
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much. something so small as always. Sorry to bother you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.