Oracle to_date function with codeigniter

adam

New Member
I am using Codeigniter to insert data into an Oracle table which contains a date field.Sample code looks like this:\[code\]$upload_details = array("user_name" = $name, "age" = $age, "date" = 'to_date($date, 'dd/mm/yyyy')');$this->Some_model->insert($upload_details);\[/code\]Now the problem is, to insert date fields into Oracle, i need to use the \[code\]to_date\[/code\] function which is executed in the database. With the above code, the \[code\]to_date\[/code\] function comes out inside single quotes and Oracle throws out an error.I think the above will work if I use \[code\]$this-db->query\[/code\] in the Codeigniter Model, but am not using that. I am using \[code\]$this->db->insert('table_name', $upload_details)\[/code\].So how can I tell codeigniter's \[code\]$this->db->insert\[/code\] to send \[code\]to_do\[/code\] function as it is and not in between single quotes.
 
Top