Author Topic: Suddenly cannot insert new category:DB Error: Bad SQL Query: SOLVED  (Read 2015 times)

0 Members and 1 Guest are viewing this topic.

Offline Tombraider

  • Newbie
  • *
  • Posts: 40
    • View Profile
MySQL version   5.1.56-log
4images 1.7.1


Error message:
DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard,
auth_readcomment, auth_postcomment) VALUES ('Zimbabwe Trip 2011', '', 0, 530, 0, 0, 2, 2, 9, 0, 0, 0, )
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 4
Error adding category


My ISP support says:
"That says there was a problem with the query that the 4images gallery generated specifically related to the ) on line 4.  My guess is its the , at the end in the VALUES
  VALUES ('Zimbabwe Trip 2011', '', 0, 530, 0, 0, 2, 2, 9, 0, 0, 0, )
There should not be a , at the end of the 0 as far as Im aware so it looks like 4images software is doing something to insert extra characters.  Have you looked tos ee if there is a update to 4images?  Has it worked in the past month?"
How do I correct this error message?
Thanks for any help in advance;  I have had this 4Images site for years and years but this look like a show stopper for me if I can't add pictures to it.  Even would appreciate a workaround I could put into PHPmyadmin or something.   :(

Nevermind,  I found out there is another categories.php in the admin folder and found an old copy of it I had renamed so I renamed it back and was able to add the category.
Funny thing is I posted about the same problem back in 2009 on this forum!
   :o
« Last Edit: July 17, 2011, 04:20:12 PM by Tombraider »