ZenphotoCMS Forum
SQL syntax error - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: SQL syntax error (/thread-6648.html)



SQL syntax error - steve mcmillen - 2010-02-23

So I'm getting this error in one of my galleries..

Zenphoto Error
MySQL Query ( INSERT INTO zp_obj_to_tag(objectid, tagid, type) VALUES (300,,'images') ) failed. 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 ''images')' at line 1

Any idea?




SQL syntax error - sbillard - 2010-02-23

Check your database. The tags table should have a field named id which is set to autoincrement. I'm guessing it is not set to autoincrement.




SQL syntax error - steve mcmillen - 2010-02-23

Thanks for the quick response. I did check the mysql table and it id field is set properly to autoincrement. Could the issue be caused by a bad image file or non supported version of a jpeg or png?




SQL syntax error - sbillard - 2010-02-23

I doubt it. The ID field from a query came back empty. That cannot happen with autoincrement. Maybe there is a record with an empty ID?