错误:Fatal error: Call to a member function bind_param() on boolean in

criyced 2016-06-02 09:14:00
调用函数出现了Fatal error: Call to a member function bind_param() on boolean in...
函数代码如下:
function inLog($userID,$operType,$content,$function,$filename){
$mysqli = mysqli_connect("localhost","root","password") or die(mysqli_connect_error());
$stmt = $mysqli->prepare("insert into log (userid,type,content,function,filename,builddate) values (?,?,?,?,?,now())");
$stmt->bind_param('issss',$userID1,$operType1,$content1,$function1,$filename1);
$userID1=$userID;
$operType1=$operType;
$content1=$content;
$function1=$function;
$filename1=$filename;
//mysqli_query($con,"insert into log (userid,type,content,function,filename,builddate) values (".$userID.",'".$operType."','".$content."','".$function."','".$filename."',now())") or exit("操作错误");
$stmt->execute();
$stmt->close();
$mysqli->close();
}
请问各位大虾,怎么回事?
...全文
484 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧