我有这段代码
$dafirstname = "SELECT fullname FROM websiteusers WHERE userName='$usernamer'";
$differentvariables = mysqli_query($link, $dafirstname);
$row = mysqli_fetch_array($differentvariables, MYSQLI_ASSOC);
printf("%s (%s)\n", $row["pass"], $row["userID"]);
if(!mysqli_query($link,$dafirstname)){
echo mysqli_error($link);
}
但它没有打印任何东西或它没有给出任何错误
答案 0 :(得分:0)
更改您的查询。你只问全名。改变它以查看结果。
$dafirstname="SELECT * FROM websiteusers WHERE userName='$usernamer'";
$differentvariables=mysqli_query($link,$dafirstname);
$row=mysqli_fetch_array($differentvariables,MYSQLI_ASSOC);
printf ("%s (%s)\n", $row["pass"], $row["userID"]);
if(!mysqli_query($link,$dafirstname)){
echo mysqli_error($link);
}