I want to update only one field in a mysql table.
I have an "ad_id" which is unique.
The field "mod_date" is a TIMESTAMPS field, which is the one I need to update.
UPDATE main_table
SET main_table.mod_date = NOW()
WHERE classified.ad_id = $ad_id";
I haven't tested this yet because I am afraid it might update all rows.
So I have two questions:
Is there anyway to prevent MySql to update more than 1 row?
Is this sql code correct for updating one row only?
Thanks