Two questions in a row.. I'm on a roll :)
When i perform UPDATEs in my admin system, I'm checking for success by
using mysql_affected_ rows() and this works fine if data is changed and
updated.
However, if a user submits an admin page without chaning any details,
the SQL executes fine, but mysql_affected_ rows() returns 0 as MySQL is
clever enough to work out that nothing changed.
How do people deal with this? It hampers my error check as
mysql_affected_ rows() can be 0 for a perfectly valid update.
When i perform UPDATEs in my admin system, I'm checking for success by
using mysql_affected_ rows() and this works fine if data is changed and
updated.
However, if a user submits an admin page without chaning any details,
the SQL executes fine, but mysql_affected_ rows() returns 0 as MySQL is
clever enough to work out that nothing changed.
How do people deal with this? It hampers my error check as
mysql_affected_ rows() can be 0 for a perfectly valid update.
Comment