2014-01-29 2 views
0

누군가 나를 도울 수 있기를 바랍니다.내 cron 스크립트에서 mysql_fetch 오류가 발생했습니다. sourcebans.php

다음
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, null given in 
..../includes/cron/sourcebans/sourcebans.php on line 171 

이 줄에서 코드입니다 :

// ######################################################################## 
// ######################### START MAIN SCRIPT ############################ 
// ######################################################################## 
$res = $vbulletin->db->query_read("SELECT `username`, `user`.`userid` as userid, 
`usergroupid`, `membergroupids`, `email`, `".$steamid_custom_field."` FROM ". 
TABLE_PREFIX ."user LEFT JOIN `". TABLE_PREFIX ."userfield` ON 
user`.`userid`=`userfield`.`userid`"); 
while($row = mysql_fetch_assoc($res)) 
{ 

내가 아는하지는 무슨 문제 난 내 스크립트를 사용하는 경우

, 난이 오류가 누군가가 나를 해결할 수 있기를 바랍니다.

감사합니다.

편집 : 여기 ... 무엇을해야 하는지를

내가 아는하지는는, 전체 코드입니다 : query_read에 대한 호출이 실패 어떤 이유로 http://pastebin.com/PzQcd8Yt

+0

[mysql \ _fetch \ _array()의 가능한 복제는 매개 변수 1이 리소스가 될 것으로 기대하고, 부울은 select에 주어진다] (http://stackoverflow.com/questions/2973202/mysql-fetch-array-expects-parameter-1 -to-be-resource-boolean-given-in-select) –

+0

vbulletin의 API를 사용하여 쿼리 ('$ vbulletin-> db-> query_read')를 호출하면 동일한 API를 사용하여 결과를 얻으십시오. 아마 vbulletin은'mysql_query()'를 내부적으로 사용하지 않을 것입니다. mysql_fetch_assoc()가 결코 작동하지 않을 수도 있습니다. – Spudley

답변

0

$res가 null입니다. query_read에서 무엇이 잘못되었는지 알아야하지만 사용중인 아키텍처에 익숙하지 않아 오류 메시지를 찾는 방법을 알 수 없습니다.

관련 문제