【发布时间】:2013-04-27 07:31:19
【问题描述】:
我一直在寻找,但我没有找到问题,希望你能帮助我:
“警告: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();
}
}
?>
【问题讨论】: