$con=mysqli_connect('127.0.0.1','root','') or die('Cannot Connect to server!');
$db=mysqli_select_db($con,'database') or die('Cannot Connect to database!');
$query="SELECT * FROM database WHERE Name = '$input'";
$result=mysqli_query($con,$query);
$row = mysqli_fetch_array($result); // <-- line 123
echo $row["id"];
我想返回Name = $ input。
的id(数据库中的另一列)但它给了我错误:
警告:mysqli_fetch_array()要求参数1为mysqli_result,在第123行的..............中给出布尔值