I have a field in mysql, timestamp(14), which logs the time an order was placed on the internet.
On my administration area, there is a section that shows if that order has been printed or not. When it's printed, a value, viewed, is changed from 0 to 1.
My query is:
$sql = "UPDATE orders SET viewed = '1' WHERE orderID = '$sorderID';";
However, my time field is automatically updated even though I did not specify for it to do so.
How to I avoid this? Surely I can leave the field as timestamp(14). My only other idea would be to change the field to int(14) and use php to stuff the time in. I don't think I have to go through all of this effort though. MySQL is automatically updating the field any time I update anything in the row.
Thanks in advance.