Inserting date with prepared statement

From: Date: Mon, 02 Feb 2004 08:29:53 +0000
Subject: Inserting date with prepared statement
Groups: php.db 
Request: Send a blank email to php-db+get-32748@lists.php.net to get a copy of this message
Hi all, I am using a PEAR DB prepared statement to insert date into mySQL. I tried several methods but the timestamp inserted is the current time instead of the one I specified. I have tried FROM_UNIX_TIME('1076565656'), date('YmdHis',1076565656); 20040130114049 , 2004-01-30 11:40:49, for mo_date with $sth = $db->prepare("INSERT INTO msg_log_mo_temp(mo_id, mo_operator," ."mo_shortcode, mo_keyword, mo_message, mo_smobile, mo_date, mo_error)" . " VALUES(?,?,?,?,?,?,?,?)"); $db->executeMultiple($sth, $mo_success); None of it work. Does prepared statement support inserting date into a timestamp colume? If it does, what is wrong with the above? Thanks, Ai Leen

« previous php.db (#32748) next »