Welcome Guest, Not a member yet? Register   Sign In
is there any way to pass mysql's NOW() to mysql ?
#5

[eluser]gtech[/eluser]
I think when you insert values using the active record quotes are escaped.. the purpose of the $this->db->set('DateUploaded', 'NOW()',false); is to ensure 'NOW()' is not escaped (the false parameter tells the set not to escape 'NOW()').

does this work?
Code:
//Data
$data = array(
    'ID' => '',
    'Hash' => $params['file_name']
);  

$this->db->set('DateUploaded', 'NOW()',false);
$this->db->set($data);

$this->db->insert('Photos');


Messages In This Thread
is there any way to pass mysql's NOW() to mysql ? - by El Forum - 03-03-2008, 05:00 AM
is there any way to pass mysql's NOW() to mysql ? - by El Forum - 03-03-2008, 05:10 AM
is there any way to pass mysql's NOW() to mysql ? - by El Forum - 03-03-2008, 05:12 AM
is there any way to pass mysql's NOW() to mysql ? - by El Forum - 04-22-2008, 01:58 PM
is there any way to pass mysql's NOW() to mysql ? - by El Forum - 04-22-2008, 02:13 PM
is there any way to pass mysql's NOW() to mysql ? - by El Forum - 04-22-2008, 02:15 PM
is there any way to pass mysql's NOW() to mysql ? - by El Forum - 04-22-2008, 02:24 PM
is there any way to pass mysql's NOW() to mysql ? - by El Forum - 04-22-2008, 02:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB