connect_errno) die('Database error: ' . $db->connect_error); $stmt = $db->prepare("set names 'utf8'"); $stmt->execute(); $stmt->close(); $minimum = 100000000; $stmt = $db->prepare('select Code,Name,Continent,Population from Country where Population > ?'); $stmt->bind_param('i',$minimum); $stmt->execute(); $stmt->bind_result($code,$name,$continent,$pop); while ($stmt->fetch()) { echo "$name ($code) on $continent, population $pop\n"; } $stmt->close(); ?>