How to save date in oracle database

Hi, guys

I want to save a date value in oracle db.

And the code is as follow:

DB:


LAST_VISIT_DATE  DATE NULL

PHP CODE:


$cur_date = date('Y-m-d H:i:s');

$user->LAST_VISIT_DATE = "to_date($cur_date,'yyyy-mm-dd hh24:mi:ss')"; 

I want to use $user->update() to save the user information.

Though, somebody give a method of using the sql statement as follow:




UPDATE CS_WAITER SET LAST_VISIT_DATE = "TO_DATE"('2011-11-01 11:30:00', 'yyyy-mm-dd 


hh24:mi:ss');

I just want use $mode->update method. Can you give me some suggestion? Thanks a lot. ;)

Thanks lucychen! :)