Web Analytics Made Easy -
StatCounter Updating a TIMESTAMP field - CodingForum

Announcement

Collapse
No announcement yet.

Updating a TIMESTAMP field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Updating a TIMESTAMP field

    I have two fields in a table... one called "date_start" and the other "date_end"... Whenever I update "date_end", "date_start" is always changed to the current date/time.

    Anyone know why?

    Table structure:

    tb_webstats_sessions:

    id_webstats_sessions int(11) No auto_increment
    id_user int(11) No 0
    id_pmaps int(11) No 0
    pmaps_module varchar(35) Yes NULL
    url_from varchar(255) Yes NULL
    date_start timestamp(14) Yes NULL
    date_end timestamp(14) Yes NULL

  • #2
    mySQL sets the FIRST timestampcolumn it encounters to Now() when a record is updated, ans since date_start comes before date_end ...
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

    Comment

    Working...
    X