当我在php中运行查询时,它不会产生任何结果。
$searchStr = htmlspecialchars($searchStr);
$sql = "SELECT * FROM steamitems WHERE steamid='" . $id . "' AND name LIKE '%".$searchStr."%'";
$r_query = mysqli_query($link, $sql);
但如果我在phpmyadmin中运行与$ sql(SELECT * FROM steamitems WHERE steamid='76561198196240283' AND name LIKE '%sawed%'
)完全相同的输出,则返回正确的结果..
编辑:我忘了提到我显然在这里打印结果
while ($row = mysqli_fetch_array($r_query)){
echo $row["assetid"];
echo $row["name];
}