• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scaffolding and Error 1064

Hello, I'm very new to CI and quite new to MySQL, so I have no idea where this might be coming from. I did a search and found a few similar errors, but nothing that explained how I might fix it.

Basically, I wanted to use scaffolding to insert a few entries into my feeds table. I got this error:

An Error Was Encountered

Error Number: 1064

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 'desc, feedURI, feedVer, siteURI, lastRetrieved, lastAttempt, errorMsg) VALUES ('' at line 1

INSERT INTO feeds (title, desc, feedURI, feedVer, siteURI, lastRetrieved, lastAttempt, errorMsg) VALUES ('Testing it again', 'Is the problem the name of the table?', 'http://something.xyz', 'rss', '', '', '', '')

An ideas? Thanks for the help!

sanitize your data. http://in.php.net/add_slashes

I have to sanitize even when I use scaffolding? Is the sanitizing for PHP or for MySQL? When I made entries through phpmyadmin, I didn't have any trouble.

I know the answer... :coolsmile:
I had the once exactly the same problem and the solution is sooo simple!!!

desc is a reserved word for mysql!!! use another name!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.