本文介绍了警告:mysqli_query()期望参数1为mysqli错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
include_once("php/db_connects.php");
$tbl_status = "CREATE TABLE IF NOT EXISTS status (
id INT(11) NOT NULL AUTO_INCREMENT,
osid INT(11) NOT NULL,
account_name VARCHAR(16) NOT NULL,
author VARCHAR(16) NOT NULL,
type ENUM('a','b','c') NOT NULL,
data TEXT NOT NULL,
postdate DATETIME NOT NULL,
PRIMARY KEY (id)
)";
$query = mysqli_query($tbl_status, $db_connects);
if ($query === TRUE) {
echo "<h3>status table created </h3>";
} else {
echo "<h3>status table NOT created </h3>";
}
我不断收到mysqli错误.我很确定我没有在PHP中使用msql.
I keep getting the mysqli error. Im prtty sure that i'm not using msql in my php.
推荐答案
更改此内容
$query = mysqli_query($tbl_status, $db_connects);
到
$query = mysqli_query($db_connects, $tbl_status);
示例 mysqli_query(mysqli $ link,字符串$ query)
这篇关于警告:mysqli_query()期望参数1为mysqli错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!