mysqli_fetch_array()期望参数1为mysqli_result。 WHERE语句可能是问题

时间:2017-09-18 02:27:09

标签: php database select mysqli where

嗨,所以我遇到了这个错误,我认为这是因为我的mysqli_query。在编写WHERE语句和前两行代码之前,我没有遇到此错误。

$filepath = $_SERVER['REQUEST_URI'];
$file = basename($filepath);
$q = mysqli_query($conn, 
    "SELECT album.Album, 
    artist.ArtistsName, 
    datereviewed.DateReviewed, 
    features.Features, 
    genre.Genre, 
    rating.Rating, 
    songname.SongName,
    link.link,
    link.ID,
    comments.Comments
    FROM `link`
    INNER JOIN album ON album.ID = link.ID 
    INNER JOIN artist ON artist.ID = link.ID
    INNER JOIN datereviewed ON datereviewed.ID = link.ID
    INNER JOIN features ON features.ID = link.ID
    INNER JOIN genre ON genre.ID = link.ID
    INNER JOIN rating ON rating.ID = link.ID
    INNER JOIN link ON link.ID = link.ID
    INNER JOIN comments ON comments.ID = link.ID
    INNER JOIN songname ON songname.ID = link.ID
    WHERE `link` = '$file'");
    $row = mysqli_fetch_array($q);   

0 个答案:

没有答案