php 写入数据库时Call to a member function bind_param() on a non-object,急,$sql="insert into user (username,password,question,answer,sex,birth,Email,phonenum,randcode,level) values(?,,,,,,,,,)";\x09$regin->mysqli_stmt=$regin->mysqli->prepare($s

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 21:53:21
php 写入数据库时Call to a member function bind_param() on a non-object,急,$sql=mysqli_stmt=$regin->mysqli->prepare($s" />
xT]OA+fdc7|072];NxkP-E-J#`il?3F h>8{g{Ι3Vlʖ|ŋ vWǑj l$ 3dj&I&-d##"FD5/<[3E4`" IgδSp&Y"a:x&5Ci:&$c@ԔPdzXYx9b)6~5a, ڤC :󜚰l,ēПTG]=vmuĹZ*}BJҧ8)Rp@KRĔY[˻'n;vWDZG|+v. A*jz^_Bf͎h

php 写入数据库时Call to a member function bind_param() on a non-object,急,$sql="insert into user (username,password,question,answer,sex,birth,Email,phonenum,randcode,level) values(?,,,,,,,,,)";\x09$regin->mysqli_stmt=$regin->mysqli->prepare($s
php 写入数据库时Call to a member function bind_param() on a non-object,急,
$sql="insert into user (username,password,question,answer,sex,birth,Email,phonenum,randcode,level) values(?,,,,,,,,,)";
\x09$regin->mysqli_stmt=$regin->mysqli->prepare($sql);
\x09$regin->mysqli_stmt->bind_param("sssssssssi",$username,$password,$question,$answer,$sex,$birth,$email,$phonenum,$randcode,$level);
看了一个下无了就是早不到原因
$regin->mysqli_stmt->bind_param("ssssss.这一行就是报错,核对了数目,根本就没错,逗号也没漏
Call to a member function bind_param() on a non-object
而且用MySQL 5.6 Command Line Client - Unicode写入成功了
insert into user (username,password,question,answer,sex,birth,Email,phonenum,randcode,level) values('test','test','test','test','test','2014-7-17','test','test','test',1)
其它的都是text型,只有birth是date和level是int型的
是我之前进行了读取,导致问题出现了在读取数据使用完成后再使用
$regin->mysqli_stmt->free_result();
进行释放,就可以了

php 写入数据库时Call to a member function bind_param() on a non-object,急,$sql="insert into user (username,password,question,answer,sex,birth,Email,phonenum,randcode,level) values(?,,,,,,,,,)";\x09$regin->mysqli_stmt=$regin->mysqli->prepare($s
对象里没有bind_param方法.