I'm currently having issues with mysql_stmt_num_rows returning both 0 rows on 0 rows, and 0 rows on 1 valid row. Am I doing something wrong or is this a bug that should be reported?
Here is a sample of what I'm doing:
Code: Select all
if($stmt = $db->prepare("SELECT id, queries FROM ".STATS_TABLE." WHERE date = ? and id = ?"))
{
$stmt->bind_param('si', $date, $this->id);
$stmt->execute();
/* Get the results */
$stmt->bind_result($id, $query_count);
$stmt->fetch();
$stmt->store_result();
/* $stmt->num_rows is an alias for mysqli_stmt_num_rows() */
echo($stmt->num_rows.'-'.$api_id);
}