Re: DB/DataObject.php | MySQL Timestamps not working as expected??
| From: | Alan Knowles | Date: | Tue, 20 Apr 2004 01:16:01 +0000 |
| Subject: | Re: DB/DataObject.php | MySQL Timestamps not working as expected?? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11959@lists.php.net to get a copy of this message | ||
Timestamps are ignored by update/insert - you should really use a datetime type.
* technically you can override this behaviour by this, but its not really recomendded..
function table() {
$ret = parent::table();
$ret['created_timestamp'] = 1; // INT!
return $ret;
}
Regards
Alan
I then thought maybe I could use PHP to set it but using code like this: $member->setMember_created_timestamp(date("YmdHis")); -or- $member->setMember_created_timestamp("20040704091734"); -or- $current_time = date("YmdHis"); $member->setMember_created_timestamp($current_time); But watching the DataObject debug (level 3) results go by it doesn't even look like it's trying to put the member_created_timestamp into the INSERT statement. Little help. Thanks! ~ Mike ----- Mike Zornek Web Designer, Media Developer, Programmer and Geek Personal site: <http://MikeZornek.com> New Project: <http://WebDevWiki.com>-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com