|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Different problem with TIMESTAMP
In reality I have two problems.
Problem one: I had this table on my database with a VARCHAR field called data. I' ve switched the type of the field to MYSQL TIMESTAMP and I dont know if the data is ok... For example what once has 1019433600, and this is php timestamp, now with MYSQL TIMESTAMP I have 20001020193600. is this value ok or not. Problem two: I'm have this vars to build the date: $_POST[year], $_POST[month], $_POST[day] and on the insert query I'm doing this: ... UNIX_TIMESTAMP('$_POST[year]-$_POST[month]-$_POST[day]')... and it's inserting different values. Can you help me with this? |
|
#2
|
||||
|
||||
|
i don't quite understand your second problem... but to answer your first problem, look at the last ten digits of your time stamp... it's the same thing except the new version includes a year-field.
as far as how your program interprets it, that's up to you... |
|
#3
|
|||
|
|||
|
Re: Different problem with TIMESTAMP
Quote:
Neworld, You may want to store the value in a variable, and then use that variable for your insert: PHP Code:
Give that a try.
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Different problem with TIMESTAMP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|