$db = new mysqli('localhost', 'root', 'root', 'phptest'); $stmt = $db->prepare('SELECT 1 FROM DUAL WHERE 2 > ?'); $a = 0; $out = null; $stmt->bind_param('i', $a); $stmt->execute(); $stmt->bind_result($out); while ($stmt->fetch()) var_dump($out); $b = 2; $a =& $b; $stmt->execute(); while ($stmt->fetch()) var_dump($out);