Hi I am getting a mysql error 1064 when inserting data is it me or my - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Hi I am getting a mysql error 1064 when inserting data is it me or my (/showthread.php?tid=3407) |
Hi I am getting a mysql error 1064 when inserting data is it me or my - El Forum - 09-28-2007 [eluser]Sally D[/eluser] ok I am trying insert a multidimensional array it looks like this array('from'=>array(1,2,3,4),'subject'=>array(1,2,3,4), 'body'=>array(1,2,3,4)); into a database set up like this id (int) primary key, from text, subject text, body text, no my problem is when ever I do $this->db->set(array(from=>$from,subject=>$subject,body=>$body)); $this->db->insert('email') I get an mysql error 1064 is it me or mysql i don't know here is the code I am working with This is my model Code: <? and here is my controller Code: function index() Right now I don't know if its the code or if its mysql. Am I calling the $this->db->set function wrong. I'm getting delusional please help thanks alot. Hi I am getting a mysql error 1064 when inserting data is it me or my - El Forum - 09-29-2007 [eluser]Sally D[/eluser] I got it to work by changing the code in my saveEmail function here is the updated version but I had to hand code the sql. Code: function saveEmail($email) I wonder why I could not just use the $this->db->set('') with out getting a mysql errror 1064? |