$query=mysql_query("SELECT COUNT(*) as counter
FROM $table->book_list
WHERE $table->book_list.class_id=$class_id"); while($result=mysql_fetch_array($query)){
$counter=$result['counter'];
FROM $table->book_list
WHERE $table->book_list.class_id=$class_id"); while($result=mysql_fetch_array($query)){
$counter=$result['counter'];
$book_author=$result['author'];
$book_contents=$result['contents'];
$book_id=$result['book_id'];
但是我这些就不能用了
FROM $table->book_list
WHERE $table->book_list.class_id=$class_id LIMIT 20");
$nums=mysql_num_rows($query);//放在这里就行了
while($result=mysql_fetch_array($query)){
$book_name=$result['book_name'];
$book_author=$result['author'];
$book_contents=$result['contents'];
$book_id=$result['book_id'];