私は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;
}
誰が何が間違っているのか説明できますか?