This may be a trivial thing but I cannot find it anywhere... I have a variable,
UPDATED="-------------- UPDATE table SET column = 'value' WHERE condition = 'true' -------------- Query OK, 3 rows affected Rows matched: 0 Changed: 0 Warnings: 0 Bye"
I would like to get 3 from the variable $UPDATED. It could be anything, sometimes it is 0, and other times non zero (single digit, double digits, etc.)
How do I get that value of how many rows were updated. I found that using -vvv to the mysql query gives the above text and so I'm using it. If there are any other easier ways to get the count of rows updated, then even better.