![]() |
INSERTing time();
Im inserting current time into the database, and the first time it worked. But now it just inserts 00000000000000 (But now every single one is 20031130084338)
How can I sort this problem out? It's quite annoying since when listing it on a another page, I get: Quote:
|
in your query try inserting is as
[sql] time = '".NOW()."'");[/sql] |
Doesn't work. (Don't think that's even a function)
|
yeah it is ;)
how are you trying to enter it into the database it depends on what information you're trying to enter really if you want the time as well as the date and what not. although to enter is into the db you should have to concatenate is as above. |
I've got it now thanks. I made an error when writing my create table query. (And I get undefined function error with now, so i' used time;))
Thanks anyways sabe:) |
sorry i weren't more intelligent :)
|
I normally use a mysql field called timestamp - so then i don't have to worry about it all as mysql does it automatically :)
|
I was originally using timestamp(14) but chaning to int(10) UNSIGNED, it worked fine:)
|
Quote:
[sql]time = NOW()[/sql] Should work, as should: PHP Code:
PHP Code:
|
yeah ive used time() now.
|
All times are GMT. The time now is 08:15 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|