Inserting date with prepared statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux