天天看点

mysql_fetch_array 失败_错误:mysql_fetch_array()期望参数1是资源,布尔[重复]

这个问题在这里已有答案:

My array:

$data =

Array (

[0] => Array ( [uid] => 1000017727223 [name] => Ter silika )

[1] => Array ( [uid] => 1000043758095 [name] => Brat elina )

[2] => Array ( [uid] => 1000053432719 [name] => Vl zacu )

[3] => Array ( [uid] => 1000054011767 [name] => Chr ris )

[4] => Array ( [uid] => 1000054595524 [name] => Ter sile )

[5] => Array (

[invt_0] => 1000035804034

[invt_1] => 1000036092866

[invt_2] => 1000001823093

[invt_3] => 1000021462636

[invt_4] => 1000030930386

[page] => 1 ) )

$list = array();

foreach($data as $fl){

$result = mysql_query("SELECT * FROM useri WHERE fb_id = " . $fl['uid']);

while ($row = mysql_fetch_array($result)) {

$list[] = $row;

}

}

我出现了下一个错误:

注意:未定义的索引:第20行的/pagination.php中的uid

警告:mysql_fetch_array()期望参数1是资源,第21行的/pagination.php中给出的布尔值

第20行:$ result = mysql_query(“SELECT * FROM useri WHERE fb_id =” . $ fl ['uid']);第21行:while($ row = mysql_fetch_array($ result)){