我正在搜索和搜索,但我没有找到问题,希望你能帮助我:
“警告:mysqli_stmt::bind_param():变量数与第 24 行“mydir”中准备好的语句中的参数数不匹配”
<?php
class Tunier {
// name of Tunier
protected $tunier_name;
// count of participants
protected $participant_count;
function __construct($name, $participant) {
// mysqli connection
$db = new mysqli('localhost','root','','tuniere') or die ('Cant connect to MySql Please try later again');
$this->tunier_name = $name or die('---');
$this->participant = $participant or die('---');
// einrichtung der Tabelle
$query = 'CREATE TABLE `?`(
`?` VARCHAR(32) PRIMARY KEY NOT NULL,
`?` INT(2) NOT NULL,
`id_spieler` INT(10) NULL
);';
$stmt = $db->prepare($query);
$stmt->bind_param('sss', $this->tunier_name, $this->tunier_name, $this->participant_count);
$stmt->execute();
}
}
?>