prepare("SELECT id,date,name,text FROM guestbook ORDER BY id DESC LIMIT ?,50"); $stmt->bind_param('i', $num); $stmt->execute(); $stmt->bind_result($id, $date, $name,$text); echo(""); while ($stmt->fetch()) { $text = htmlentities($text,ENT_QUOTES); echo(""); } echo("
[${id}]${date}${name}${text}
"); $stmt->close(); $mysqli->close(); $p++; echo("次の50件"); ?>