CodeIgniter Forums
error db :S [UPDATE] - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: error db :S [UPDATE] (/showthread.php?tid=4050)



error db :S [UPDATE] - El Forum - 11-04-2007

[eluser]MMCCQQ[/eluser]
hi


i dont know what happed!...

my table db

id
to
from
subject
body

Code:
$this->db->insert('message', $_POST);

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 'to, from, subject, bod) VALUES ('dfd', '1', 'fdf', 'gdfgdfg')' at line 1

INSERT INTO message (to, from, subject, bod) VALUES ('dfd', '1', 'fdf', 'gdfgdfg')


error db :S [UPDATE] - El Forum - 11-04-2007

[eluser]gtech[/eluser]
why don't you know what happened? <- [edit] sorry must of not read bottom bit of your question, unless it was updated.


error db :S [UPDATE] - El Forum - 11-04-2007

[eluser]John_Betong[/eluser]
Hi ,

You are missing the 'y' to your body:
Code:
// Your code
// INSERT INTO message (to, from, subject, bod) VALUES (’dfd’, ‘1’, ‘fdf’, ‘gdfgdfg’)
    INSERT INTO message (to, from, subject, body) VALUES (’dfd’, ‘1’, ‘fdf’, ‘gdfgdfg’)

Cheers,

John_Betong
&nbsp;


error db :S [UPDATE] - El Forum - 11-05-2007

[eluser]MMCCQQ[/eluser]
Solved!

to and from cant be user