Unable to add/update rows in the example index.php

QuestionsUnable to add/update rows in the example index.php
David asked 10 years ago

Dear All,

I just downloaded the free PHP Grid version. Unzipped it on a folder on the webserver, and then edited index.php to point to a local MySQL database I already have.

Then I point my web browster to index.php and it wonderfuly displays all the rows.

However, whenever I try to add a new record or modify an existing one, it doesn't work. I don't see any error neither on the browser or the phplog, but the mysql record just don't get updated.

I tried to update it via mysql commandline and it works.

Could someone please give me some help ?


2 Answers
David answered 10 years ago

OK, I've managed to debug the error with FIREBUG. It says :

Couldn't execute query. 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 'Group,Year,Construct,Oligos,Comments) VALUES ('3RRR','','','','','','','','','',' at line 1 – INSERT INTO proteins (PDBID,ProteinName,Abbr,Family,Organism,Res,LigType,Ligand,Water,GProt,Group,Year,Construct,Oligos,Comments) VALUES ('3RRR','','','','','','','','','','','','','','')

Why is that ? How can I keep debugging this ?

David answered 10 years ago

Well, sorry for this. I've found the problem. One of my columns is using a MySQL reserved word.

Your Answer

15 + 11 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?