我已经开始学习 mysqli 准备语句技术,并坚持以下几行:
include 'config.php';
$location=$_SESSION['cl'];
$sql = $db->prepare("SELECT * FROM locations WHERE loc LIKE ?");
$sql -> bind_param('s',$location);
$sql -> execute();
$sql->store_result();
$sql -> bind_results($results);
while($sql->fetch()){
echo $results;
}
任何人都可以解释什么可能是错的?