我已经使用基本SQL一段时间了,我遇到的任何问题都很简单。我不知道我是否遗漏了一些东西,但是我已经与我的mySQL服务器建立了正常的连接(num_rows = 1
),但没有任何内容会通过mysqli_fetch_array
或fetch_assoc
显示
$con = mysqli_connect("localhost", "***", "***", "***");
$result = mysqli_query($con,"SELECT * FROM support WHERE steamid = '".$steamprofile['***']."'");
while($row = mysqli_fetch_array($result)) {
echo $row["email"];
}
答案 0 :(得分:0)
您可以改变这样的代码。
$con = mysqli_connect("localhost", "***", "***", "***");
$result = mysqli_query($con,"SELECT * FROM support WHERE steamid = '".$steamprofile['***']."'");
while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$row["email"];
}
我认为$row = mysqli_fetch_array($result)
是错误。