SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot Haakon's Avatar
    Join Date
    Jan 2001
    Location
    Up North
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    The date won`t change

    Hi, I`m currently following the sitepoint column about mysql/php, and I`m allready stuck in part 3 .
    Well, the problem is that the date won`t change no mather what. The date of the Joke wen`t 0000-00-00 at first when I created them (for no reason?), and now I try to update it. When I do it it says "rows matched:1 changes:1 warnings:0 . So what`s the problem!? It still says 0000-00-00 when I describe Jokes. I`m having fun anyway

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Maybe you're in a timewarp where you will never age or grow old?

    More likely is that the date you tried to enter was not in the proper format, so mysql just entered 0000-00-00 for you rather than giving you an error and terminating the script. Go to:

    www.mysql.com

    and check out the date functions. Or, post your INSERT query and your UPDATE query and someone will readily spot your error.
    Last edited by 7stud; May 25, 2001 at 09:55.

  3. #3
    SitePoint Zealot Haakon's Avatar
    Join Date
    Jan 2001
    Location
    Up North
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then It may be a timewarp because I`ve tested with wrong dates and then it shows "changes:0 warnings:1".
    I think I know the code in my head by now:
    update Jokes set JokeDate= "1997-05-06" where id=1;
    Last edited by Haakon; May 25, 2001 at 10:40.

  4. #4
    SitePoint Zealot Haakon's Avatar
    Join Date
    Jan 2001
    Location
    Up North
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ehhh, apparantly everything was as it should be in the first place, the date should show 0000-00-00. It was just me thinking it should show the real date but it apparantly was just a kind of template I looked at. Sorry for this post, and again


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •