嗨,所以我遇到了这个错误,我认为这是因为我的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);