Jump to content

Recommended Posts

i am trying to store the time inside a mysql db at the moment i am tying to store this using the NOW() function which i was under the impression that this would store the date and the time inside the db but all i keep getting stored inside is 2008.

 

should this function give just the year or should it give the time and date also.

Link to comment
https://forums.phpfreaks.com/topic/108661-solved-php-time-function/
Share on other sites

you need to show us your code and how you are inserting the time.

 

then all the questions of UNIX timestamps and NOW() functions that'll come up later won't be as confusing.

 

 

but before I decide to tell you about using a UNIX timestamp instead of the NOW() function....we all need to see you current code so you don't mess it up with random lines people are probably going to give you.

just to show you that the NOW() function is not working as it should here is a screen shot of what was in the db after the ode had been run.

 

www.acmeart.co.uk/test/screenshot.jpg

 

i will try changing it to a varchar (20) and see what that produces

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.