It seems the company I host my webserver with doesn't have MySQLnd installed (or at least not on my server). This means that in php I can not use
$stmt->get_result()
$result->num_rows()
$stmt->bind_result()
$stmt->fetch()
fetch()
$result->num_rows_affected()
There doesn't seem to be an alternative. The best I could do was make a method that loops through the rows and returns the count:
function rowCount($stmt) {
$count = 0;
while ($stmt->fetch()){
$count++;
}
$stmt->data_seek(0); //reset the stmt to the first row
return $count;
}
Note this does not solve the rows_affected problem.