你能解释一下为什么当我尝试这个查询时它只返回一半的行吗?
例如,如果 $records 由 4 个值组成,它只会从 DB 中获取第 1 行和第 3 行。
怎么了?
$query=mysql_query("SELECT * FROM ".DB_PREF."books WHERE book_id IN ('".$records."')");
while($fetch=mysql_fetch_assoc($query))
{
global $book_id, $book_title, $book_description, $book_author_id, $book_author_name, $book_author_surname;
$book_id=$fetch['book_id'];
$book_title=$fetch['book_title'];
$book_description=$fetch['book_description'];
$book_author_id=$fetch['book_author_id'];
$query=mysql_query("SELECT * FROM ".DB_PREF."profiles WHERE user_id='".$book_author_id."'");
$fetch=mysql_fetch_assoc($query);
$book_author_name=$fetch['user_name'];
$book_author_surname=$fetch['user_surname'];
getModule('htmlmodule...');
}