#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    2
    Rep Power
    0
    Sorry to bother you with this but when I try to update datetime fields on my
    webserver, the fields return 0000-00-00 00:00:00 which according to the docs
    means an invalid date. It happens in either a php3 script or an sql statement
    through phpmyadmin.

    update playermaster set lastlogin='19991028';
    or
    update playermaster set lastlogin='19991028125900';

    phymyadmin returns "Your SQL-query has been executed successfully"


    My web server is using :
    MYSQL = 3.22.27
    APACHE = 1.3.11
    PHP = 3.0.14

    It works fine on my local host under win 32.
    It works fine on date fields on both the webserver and local host.

    Any ideas?

    Randy
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Location
    Hannover, Germany
    Posts
    17
    Rep Power
    0
    i had similar probs ...

    in the definition of the date/time-field define a field-lenght. MySQL supports diffrent styles of date/time-fields

    CodeDuck =8
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    2
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by CodeDuck:
    i had similar probs ...

    in the definition of the date/time-field define a field-lenght. MySQL supports diffrent styles of date/time-fields

    CodeDuck =8
    [/quote]

    What syntax do you use to create a datetime field in MYSQL ?

    I can't find anything that will work

  6. #4
  7. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    hi,

    I think you should use a TIMESTAMP()datafield in your table....



    [This message has been edited by Shiju Rajan (edited March 17, 2000).]

Similar Threads

  1. 451 Name server timeout but DNS works!
    By leesweet in forum Mail Server Help
    Replies: 5
    Last Post: March 1st, 2007, 09:02 AM
  2. Replies: 0
    Last Post: January 16th, 2004, 09:44 AM
  3. Variables won't load but perl script works
    By Silver Machine in forum Perl Programming
    Replies: 4
    Last Post: January 15th, 2004, 10:15 AM
  4. display xml: works with local file but not remote
    By lentil dal in forum PHP Development
    Replies: 15
    Last Post: January 10th, 2004, 05:53 AM
  5. mydomain.net works but www.mydomain.net doesnt
    By Iroc in forum Apache Development
    Replies: 1
    Last Post: December 27th, 2003, 06:47 PM

IMN logo majestic logo threadwatch logo seochat tools logo