MySQL: Take mysql_affected_rows returning -1 into account (was not a SELECT statement)