I know how to execute MySQL queries / commands from bash:
mysql -u[user] -p[pass] -e "[mysql commands]"
or
mysql -u[user] -p[pass] `<<`QUERY_INPUT [mysql commands] QUERY_INPUT
How can I determine how many rows affected the query?
I tried:
variable='`mysql -u[user] -p[pass] -e "[mysql commands]"`'
Executes a command, but does not return the number of rows affected.
bash mysql
florin.bunau Jul 05 '09 at 11:11 2009-07-05 11:11
source share