We have a simple sql script which needs to be executed against a MySQL database and we would like print log statements on the progress of the script (e.g. Inserted 10 records into foo or Deleted 5 records from bar). How do we do this?
- I would like to know the syntax to be used for insert/update/delete statements.
- How do I know about the number of rows affected by my statement(s).
- I would also like to control printing them using a ECHO off or on command at the top of the script.
- The script should be portable across Windows / Linux OS.