我正在尝试从 PHP 将一行数据插入到表中。但是我从下面的代码中收到一条错误消息,说:
“mysqli_query() 期望参数 1 为 mysqli”
$myServer = "mysql.x90x.net";
$myUser = "u1908429**_*****";
$myPass = "***************";
$myDB = "u1908429**_*****";
$dbhandle = mysqli_connect($myServer, $myUser, $myPass, $myDB)
or die("Couldn't connect to SQL server on $myServer.");
$query = "INSERT INTO student_data VALUES ('$fname', '$lname', '$gpaP', '$agP', '$awardP', '$awardTP', '$rigorP', '$APP')";
$result = mysqli_query($query, $dbhandle)
or die(mysql_error().'<br>SQL:'.$query);
mysqli_close($dbhandle);
我认为它说的有问题,mysqli_query
但我不知道有什么问题?...