我需要能够一次读取 Mysql 数据库 10 条记录的内容,以便我可以显示前 10 条,然后当用户单击第 2 页时,我需要能够读取第二块 10 条记录前 10 个等
这就是我用来阅读前 10 个的
$result = mysql_query("SELECT id FROM general_thread WHERE id_topic = $id");
$num_rows = mysql_num_rows($result);
$result = mysql_query("SELECT id, user_message, user_created, user_id, user_posts, user_rank, date_created FROM general_thread WHERE id_topic = $id ORDER BY id DESC
LIMIT 10;")
or die(mysql_error());