mysqli::stmt报Fatal error: Call to a member function bind_param() on a non-object in ...
2012-04-18 06:53
316 查看
$name="小明";
$sex="男";
$age=20;
$sql="insert into student(name,sex,age) values (?,?,?,?)";
$mysqli_stmt=$mysqli->prepare($sql);
$mysqli_stmt->bind_param('ssi', $name,$sex,$age);
没有提示语法错误,但是数据插入总是不成功。经检查,发现:$sql="insert into student(name,sex,age) values (?,?,?,?)";中多了一个?,参数没有对应。
$sex="男";
$age=20;
$sql="insert into student(name,sex,age) values (?,?,?,?)";
$mysqli_stmt=$mysqli->prepare($sql);
$mysqli_stmt->bind_param('ssi', $name,$sex,$age);
没有提示语法错误,但是数据插入总是不成功。经检查,发现:$sql="insert into student(name,sex,age) values (?,?,?,?)";中多了一个?,参数没有对应。
相关文章推荐
- Fatal error: Call to a member function bind_param() on a non-object in
- Fatal error: Call to a member function createTemplate() on a non-object in
- 【ERROR_2】Call to a member function bind_param() on a non-object
- 【Fatal error: Call to a member function read() on a non-object in】
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- DEDE发生Fatal error: Call to a member function read() on a non-object in 错误解决方法
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Web_PHP_织梦更新列表页提示Fatal error: Call to a member function GetInnerText() on a non-object in ...
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- 常见的magent问题系列二--Fatal error: Call to a member function toHtml() on a non-object in ../../Layout.php
- Fatal error: Call to a member function getData() on a non-object in /data/php/framework/exts/zii/wid
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- call to member function bind_param() on boolean...........
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap
- Fatal error: Call to a member function getSource() on a non-object in G:\wamp\www\ChinaMagicCube\ap