By using DBI.
I only can give you a very broad answer, sorry. If you told us where exactly you encounter problems, maybe I could give you a more specific answer.
| [reply] |
i can execute the mysql querry using DBI.
i want to know the status of the table after executing the querry, like if i load the table with data, then i want to catch the mysql db response like,
Query OK, 0 rows affected, 7 warnings (0.00 sec)
Records: 7 Deleted: 0 Skipped: 7 Warnings: 7
| [reply] |
| [reply] |
I believe a combination of DBI and DBD::mysql can give you what you are looking for. The $sth->do method returns the number of items affected. The DBD::mysql has a 'mysql_warning_count' parameter that is non-portable, if you want to get the warnings.
I suspect, however, that you are looking for the exact string you see from the CLI '0 rows affected, 7 arnings...). This is a common desire, but it is not coming from the engine -- this comes from the CLI (ie, running the 'mysql' command from the *nix prompt). I believe you can generate all this info yourself, just not with a single call
| [reply] |