Search found 1 match
- Mon Aug 22, 2011 1:33 pm
- Forum: Databases
- Topic: mysqli affected_rows = -1, but error and errno are blank
- Replies: 11
- Views: 15762
Re: mysqli affected_rows = -1, but error and errno are blank
Hi Jeff, You need to use store_results(). For SELECT statements mysqli_affected_rows works just like mysqli_num_rows. If you use store_results(), you get the number of rows selected. If you don't, you get that -1. best, Pedro // Connect to the database $mysqli = new mysqli($host, $user, $pass, $db);...