Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#93 Birthdays not saved

0.7.x
open
5
2005-03-07
2005-02-02
Dave
No

When setting a users birthday, I see the date is
written to the MySQL db as expected. Thsi is retained
until the user logs out and then back in. Upon login,
the date is somehow rewritten to the current date.

Using version 0.7.3 "Finally", php 4.3.10, and Apache
on Windows 2000. (Also verified this issue on SuSE
Linux 9.2 webserver and the MGW demo).

Thanks,

Ab

Discussion

  • Dave
    Dave
    2005-02-03

    Logged In: YES
    user_id=745211

    I fixed this, FYI... Just changed the field type for the
    birthday field in the mgw_users table from a timestamp to a
    date type field.

    Thanks,

    Ab

     
  • Dave
    Dave
    2005-02-03

    • status: open --> closed
     
  • Logged In: YES
    user_id=109671

    Has this change been committed to cvs, or did you just do it
    at your mgw setup?

    Franky

     
    • milestone: 137332 -->
    • status: closed --> open
     
  • Dave
    Dave
    2005-02-08

    Logged In: YES
    user_id=745211

    I apologize for the delayed response, I wasn't actually
    watching this and just noticed it on my sf.net page. I
    didn't (and am not really sure how to) commit this to CVS.
    I just changed it on my webserver by issuing the command
    (without quotes):

    "alter table mgw change birthday birthday date"

    Birthday is repeated so that it keeps the field name and
    just changes the field type ( alter table [tableName] change
    [field name] [new field name] [field options]).

    Thanks,

    Ab

     
  • Dragon
    Dragon
    2005-02-26

    Logged In: YES
    user_id=1226591

    The value in the mgw_users table is changed on login.
    It is rewritten with the current timestamp.
    The reason is a default NOW() function that MySQL puts on
    the first timestamp column in a table. Therefore this field gets
    updated everytime the table is updated (which in this case
    happens on login). I saw nothing in the MySQL
    documentation on this.
    The type should be changed to datetime (not date, because
    we will loose the empty time :). However, someone might
    decide to use this for some astro module, who knows...

     
  • Logged In: YES
    user_id=105527

    Since we don't create the database tables directly, but
    through ADOdb XML Schema, we have the choice between either
    'T' or 'D' for the birthday field.

    'T' obviously evaluates to a TIMESTAMP in MySQL, whereas 'D'
    gives us a DATE column. So... I made it a 'D', if someone
    wants to use the field for an astro module - bad luck... :)

    Please test the change, since I didn't... Sorry.

     
    • labels: --> General patches
    • milestone: --> 0.7.x
    • assigned_to: nobody --> k-fish