This is a discussion on "incorrect time :S" within the PHP Forum section. This forum, and the thread "incorrect time :S are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
incorrect time :S
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
||||
|
incorrect time :S
I get a mysql error when inserting the variable time with value time() saying that it's the incorrect format.
the column is called timestamp and is type timestamp with default current timestamp
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|
|
||||
|
Re: incorrect time :S
oh i think i need to use integer for the type..
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: incorrect time :S
Mysql timestamps are completely different to PHP time.
PHP uses unix timestamps - num of seconds since the epoch. MYsql timestamps have the format 'YYYY-MM-DD HH:mm:SS' mySQL can work with a much larger date range then PHP. I find that making a column with an integer value works for simple logging via PHP. Cheers,
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
||||
|
Re: incorrect time :S
Quote:
gotta find my code to convert it to a date now
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: incorrect time :S
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My first time | jabo | Introduce Yourself | 3 | Feb 26th, 2008 17:33 |
| Spacing between list items incorrect when span tag is used in a list item... | MikeTheVike | Web Page Design | 5 | Apr 18th, 2007 01:52 |
| Line 1: Incorrect syntax near '='. | dc | ASP.NET Forum | 1 | Sep 8th, 2005 12:10 |
| layout sits incorrect in smaller window, hit F5 to fix! | crite | Web Page Design | 1 | Jul 6th, 2005 17:05 |
| Adjusting time from server time to local time | Tim356 | Classic ASP | 10 | Jun 21st, 2004 14:57 |