我需要创建一个表,其中包含用户在我的android应用程序中给出的类名。我尝试使用以下代码执行此操作,但是我收到错误
$con = mysqli_connect("mysql.hostinger.in","u975450189_****","********","u975450189_****");
$classname = $_POST["classname"];
$classid = $_POST["classid"];
$statement = mysqli_prepare($con, "CREATE TABLE ?(id int(20) AUTO_INCREMENT PRIMARY KEY,? VARCHAR(20) NOT NULL);");
mysqli_stmt_bind_param($statement, "ss", $classname, $classid);
mysqli_stmt_execute($statement);
$response = array();
$response["success"] = true;
print_r(json_encode($response));
警告:mysqli_stmt_bind_param()要求参数1为mysqli_stmt,第10行/home/u975450189/public_html/ClassCreate.php中给出布尔值
警告:mysqli_stmt_execute()要求参数1为mysqli_stmt,第11行/home/u975450189/public_html/ClassCreate.php中给出布尔值 {"成功":真}
帮助我,我很震惊