Disable identifier protection in 3.0 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Disable identifier protection in 3.0 (/showthread.php?tid=62470) |
Disable identifier protection in 3.0 - edo - 07-17-2015 Hello All, I can't find a way to disable identifier protection in an update statement like this one: $this->db->update('profile', $profile, "id = $id"); I want to do this because one the columns is a timestamp and I need that column to store the now() value. It's failing because the database receives the 'now()' value (incorrect date time value). Thank you. Edo. RE: Disable identifier protection in 3.0 - skunkbad - 07-17-2015 Not exactly the solution you were looking for, but NOW() is roughly equivalent to PHP's formatted date: Code: date('Y-m-d H:i:s') RE: Disable identifier protection in 3.0 - edo - 07-18-2015 (07-17-2015, 07:51 PM)skunkbad Wrote: Not exactly the solution you were looking for, but NOW() is roughly equivalent to PHP's formatted date: Skunkbad, You're right! Thank you. Edo. |