Re: Timestamps
| From: | Jason Pruim | Date: | Wed, 30 Apr 2008 15:38:02 +0000 |
| Subject: | Re: Timestamps | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44934@lists.php.net to get a copy of this message | ||
On Apr 30, 2008, at 11:35 AM, Stut wrote:
On 30 Apr 2008, at 16:29, Jason Pruim wrote:Okay, so I did a really crappy job at my sudo code... The field name is actually Last_Updated. so my update code looks like this: Last_Updated='$modifiedTimestamp' *Slaps his wrist... Bad copy/paste! BAD!!! -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424-9337 www.raoset.com japruim@raoset.comOkay... So I know this should be simple... Trying to store a timestamp in a MySQL database... The timestamp I am making like so: $modifiedTimestamp = time(); and then just $sql = "Updatetimestamp is a reserved word. Try putting it in backticks.mytableset timestamp='$modifiedTimestamp' where Record='1'"; Simple right? Not quite...in my database it's storing a "0" in the timestamp field which is a int(10) field. I have googled, and searched manuals, but have not been able to figure out what is going on.... Any Ideas?