⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Add Record Does Not Work



mandeep
  • profile picture
  • Member

Posted 20 July 2012 - 21:06 PM

I succesfully installed grocery crud on codeigniter. It pulls data from the table in my database. However, it only lets me add one new record to the table.
For example, I can click "Add Record" fill out the fields and press "Save" and the first time I do this everything works fine.

The second time I try to add a new record, it does not work. Nothing is added to the table. Any Ideas?

Also, firebug in firefox gives the following warning: Use of getAttributeNode() is deprecated. Use getAttribute() instead.

When I press "Save" I get the following errors from Firebug:
"NetworkError: 500 Internal Server Error - http://mysite/intern...results/insert"


SyntaxError: JSON.parse: unexpected character

mandeep
  • profile picture
  • Member

Posted 20 July 2012 - 22:37 PM

I unset_jquery and now i am getting:
Database error:
[color=#4F5155]Duplicate entry '2147483647' for key 'PRIMARY'[/color]
[color=#4F5155]INSERT INTO `tablename` (`myID`, `tNum`, `ItemNum`, `mbID`, `owner`, `Num`, `xRank`, `Rank`, `yPoints`, `Points`, `date`) VALUES ('2022', '2022', '2022', '2022', '2022', '2022', '2022', '2022', '2022', '2022', '')[/color]

[color=#4F5155]Next, I am setting the primary key using set_primary_key('id', 'tablename') but, that did not work.[/color]

mandeep
  • profile picture
  • Member

Posted 20 July 2012 - 22:53 PM

I think I finally solved the problem The issue was the my primary key was set as an INT, I changed it to BIGINT. I'm guessing my table has more records than I thought it did. :D