Re: [PHP-DB] Timestamps

[email protected] (Stut)
Newsgroups php.db
Message-ID <[email protected]>
On 30 Apr 2008, at 16:29, Jason Pruim wrote:
> Okay... 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 = "Update `mytable` set  
> 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?

timestamp is a reserved word. Try putting it in backticks.

-Stut

-- 
http://stut.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.