PDA

View Full Version : sql error message


optimized
December 2nd, 2003, 01:20 PM
When adding a new category, I get the following message above each of the image entry dialog boxes.

MySQL error: 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 '' at line 1
Query was: SELECT Image FROM Categories WHERE record_number =


Can you tell me what is happening here and how to correct this?

This did not happen on the 1.09 installation. This is a clean 1.3 version install.

Thanks,

- Bill -

Duplicate posting due to the first one being placed in the wrong forum. Sorry...

Jamie
December 3rd, 2003, 11:29 AM
Please see this post:

http://www.ldev.com/forums/showthread.php?t=1071

Thanks,
Jamie

bjmyers
July 31st, 2004, 04:54 PM
Hi,
I've got ver 1.3.1 and have checked the recommended thread (the fix was already there), but I'm getting this same error in various places. It happens in the demo store when it tries to display the products within a category that has no products. It happens when I do an advanced search.

i.e. When I select Hardware from the product catalog, the screen refreshes with the Hardware image, a slogan ("Bob Villa does his..."). The browser appears to get locked up, so I press STOP and the looping MySQL errors display, stating the query was "SELECT * FROM Sales Agreement WHERE record number = ". It appears that the record number is not making it into the query variable or is not being parsed correctly. Any ideas of where to look would be appreciated. Thanks!

(My support ran out already and I don't think I can afford a trouble ticket anymore! ) ;)

Jamie
August 16th, 2004, 12:30 PM
Hi,

It sounds like you might have a blank sales agreement on one or more products in that category. Open the product records that are in the category, find the "Sales Agreement" section, and see if you have any blank select inputs there. If so, that is the problem. To delete them, you'll first need to set them to a sales agreement and submit the record. Then, go back and check the box in the delete column next to it, and submit again. There is a bug that does not allow you to delete blank entries, which is why you first need to set it to a sales agreement.

Thanks,
Jamie

bjmyers
August 16th, 2004, 10:40 PM
Thanks Jamie. I think I ended up doing a similar thing. :confused: I deleted each of the items and categories in the db tables and started with fresh products. Everything started working great at that point. :yahoo:

Thanks for your support and the fine product! :beer: