HELP!Error Number: 1064 |
[eluser]jigen7[/eluser]
hi im just new using code igniter wondering why this error occur my mysql version is 5.0.37 do i need to configure something else? Code: An Error Was Encountered Code: $this->db->insert('download',$_POST); hoping for your kind reply thx
[eluser]tonanbarbarian[/eluser]
problem is very simple the field name desc is a reserved word in mysql (and every other database platform for that matter) so you need to backtick the name if you are writing the insert query yourself then you need to change it to Code: INSERT INTO download (`desc`, url, category, size, `date`) VALUES ... If you are using the active record CI methods to build the insert then it should backtick for you automatically
[eluser]Derek Allard[/eluser]
Hey jigen7. Take a look at the Input library for some uses of post(). And welcome to CodeIgniter! Derek
[eluser]jigen7[/eluser]
lol i forgot its a reserve word thx man for reminding well i really have fun using codeigniter lol thx |
Welcome Guest, Not a member yet? Register Sign In |