prepare('SELECT f1,f2 FROM t1 WHERE f2 = ?')) { $stmt->bind_param('s', $xf2); $stmt->execute(); $stmt->store_result(); $stmt->bind_result($f1, $f2); while ($stmt->fetch()) { print $f1 . ' ' . $f2 . "\n"; } $stmt->close(); } else { die($con->error); } $con->close(); ?>