OK, so I've gone round and round so many times now, I probably can't see the wood for the trees.
I want to return the number of rows that match the WHERE clause. This is my code
$stmt = $conn->prepare("SELECT id, title, category, last_completed, next_due, assigned_to FROM activities WHERE userId = ? AND status = ? AND DATEDIFF('$date', next_due) >= 1");
$stmt->bind_param("ss", $userId, $status);
$stmt->execute();
$result = $stmt->get_result();
$num_rows = mysql_num_rows($result);
echo $num_rows;
I have no doubt the error is obvious, but I can't see it. I can return the number of rows and establish it is more than 0, I just can't echo the num_rows!!!!