![]() |
query problem - 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: query problem (/showthread.php?tid=11605) |
query problem - El Forum - 09-16-2008 [eluser]dimis[/eluser] I use this code Code: foreach ($lans as $lan) Code: Error Number: 1064 query problem - El Forum - 09-16-2008 [eluser]Bramme[/eluser] Try with an alternative syntax maybe... Code: $qry = "REPLACE INTO material_lan SET lan_id = "$value".."; // etc, you get the picture It might be possible CodeIgniter messes up your syntax, not sure though. query problem - El Forum - 09-16-2008 [eluser]Sumon[/eluser] I think, you mixed up something. You might expect either Code: $sql = "insert into material_lan ( lan_id ,lan_text,material_id) values ($lan['code'],$lan['name'],$id)"; Code: $data = array( query problem - El Forum - 09-16-2008 [eluser]dimis[/eluser] replace is a statement of mysql (I thing only). At my situation i thing it was buggy so I change it to update. query problem - El Forum - 09-16-2008 [eluser]Michael Wales[/eluser] You can use $this->output->enable_profiler(TRUE) to always see exactly what CI is sending to your database - great for catching little quirks where ActiveRecord isn't behaving as you would expect it to. |