Avoid Changing Mysql Timestamp

Normally a Mysql Timestamp field will change on any update to the record. Nice, unless you want to keep the original value!

One way to save the value is to set it back in the sql query.

E.g.

$sql="UPDATE response SET notes=\'$notes\', submitted=submitted WHERE id=\'$rids\'";

Where submitted is a timestamp field.

Related Scribbles:
  • MySQL Notes


  • ID: 418
    Author:
    leonard
    Date Updated:
    2004-02-15 18:31:09
    Date Created:
    2004-02-15 18:31:09

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> Avoid Changing Mysql Timestamp
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.