Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result

后端 未结 6 821
耶瑟儿~
耶瑟儿~ 2020-11-21 05:35

I get the error when trying to run this:

query(         


        
6条回答
  •  囚心锁ツ
    2020-11-21 05:51

    Your query must have a problem which is causing $result to be an invalid resource.

    Use this

    query('SELECT title,content FROM staff_vacancies ORDER BY ordering LIMIT 0,100');
    // Get an array containing the results.
    // Loop for each item in that array
    
    if($result){
    while ($row = $connector->fetchArray($result)){
    
    echo $row['title'].'';
    echo $row['content'];
    }
    }
    ?>
    

提交回复
热议问题