mysql_error()不返回false但是mysql_fetch_assoc($ result)请求资源而不是布尔值

时间:2014-07-10 08:32:40

标签: php mysql

mysql_error()返回空白但是while抛出了一个错误,要求输入资源而不是布尔值。可能是什么原因?

 $query2 = "SELECT song FROM songs where id like '$lastComparison[$sg]'";

         $results = mysql_query($query2,$link2);

error_log(mysql_error());

          while ($rows2 = mysql_fetch_assoc($results)){
                $lastComparison[$sg] = $rows2['song_title'];
                }

0 个答案:

没有答案