Welcome Guest, Not a member yet? Register   Sign In
Issues with $this->db->insert
#2

[eluser]champs[/eluser]
All strings passed to Active Record are inserted as strings, so NOW() is wrapped in quotes, just like everything else, and you will need a function that returns the date string you need. In MySQL, you've got an ON UPDATE CURRENT_TIMESTAMP attribute (that you can set on ONE field, IIRC), but if you have multiple date fields, don't bother.

And just to get out ahead of you, a special exception for NOW() means special exceptions for *every* pet function someone cares to use in their statements.


Messages In This Thread
Issues with $this->db->insert - by El Forum - 07-05-2007, 09:13 AM
Issues with $this->db->insert - by El Forum - 07-05-2007, 09:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB