CodeIgniter Forums

Full Version: Scaffolding and Error 1064
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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?', '', 'rss', '', '', '', '')

An ideas? Thanks for the help!

El Forum

sanitize your data.

El Forum

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.

El Forum

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!