How to determine if Mysql update succeeded with PDO PHP?
Check affected rows
$sth->rowCount();
This would only work if the updated row has changes, but what if the row is unchanged?? Then $sth->rowCount()
would return 0
even if the update has succeeded...