[eluser]fusionblu[/eluser]
I am updating a row only if a certain column is null. I am using the null check in the SQL statement.
My statement is -
Code:
$query = $this->db->query("update t_temp_topics set verified_date=now() where id=10 and token='mytoken' and verified_date is null");
I need to check how many rows ( 1 or 0) were updated and perform some actions. In the above case the result ($query) is always 1 even if the update statement did not update any rows.
How do I check for 'no rows updated' condition ?
Thanks.