Obviously, mysqli_stmt::$affected_rows
is not available unless prepared statements are being used. But when prepared statements are being used, what's the difference between mysqli::$affected_rows
and mysqli_stmt::$affected_rows
?
I have the same question in regards to mysqli::$insert_id
vs mysqli_stmt::$insert_id
.
I'm trying to decide if I should be using one in favour of the other.
I've read the PHP manual entries for these properties. I've done some testing (PHP 5.3.17) using a single execute and using multiple executes. I don't see a difference.
So I am wondering if maybe there is some difference under certain circumstances (or certain versions). If they are exactly the same, why have both?