I’m trying to find out whether a delete query executed properly. I know how many rows its supposed to delete, and I’d like to check that the number that were deleted, matches what’s expected, from within the query itself.
How do I find out the number of rows that I just deleted, from within a SQL query running against MySQL? Separate statements are fine, as long as I can bundle them into one query.
see MySQL ROW_COUNT function here http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_row-count