Request -
$q = $this->db->query("SELECT text FROM page WHERE id = '".$pageId."'"); echo $q->num_rows; displays 1.
Request -
$stmt = $this->db->prepare("SELECT text FROM page WHERE id=?")){ $stmt->bind_param('i',$pageId); $stmt->execute(); echo $stmt->num_rows; displays 0.
WHERE id = '25'queryWHERE id = '25'(in quotes), in the second case, not. This is the difference - splash58where id=25for example, unlike the first. How this may affect the result, I do not know - splash58