I have a PHP project that uses Pear DB to deal with MySQL database. One of the functions inside of that project relies on a result of SELECT ROW_COUNT()
to find out number of rows affected by certain SQL statement. On MySQL 5.1 ROW_COUNT()
behaves as expected, whilst on 5.5 it always returns 0.
I have also tried performing an insert through MySQL Workbench and executing SELECT ROW_COUNT()
and it also returns 0. Although, doing same thing through MySQL cli, works fine!
Anybody stumbled upon this?
Thanks!
The behaviour of row_count()
has changed in MySQL 5.5. For more Information see the MySQL RefMan for row_count().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With