num_rows预处理语句返回警告:

时间:2014-04-24 12:19:44

标签: php mysqli warnings rows

当我尝试其中一些时:

$password = $_POST["password"];
$options = array('cost' => 11);
$encrypt_password=password_hash($password, PASSWORD_BCRYPT, $options);
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
$username_check=$_POST["username"];
$chk_usr="SELECT username FROM users WHERE username=?";
$result=$bd->prepare($chk_usr);
$result->bind_param('s',$username_check);
$result->execute();
$result->close();
$register_date=date("d.m.y");
$avatar='images/default_avatars/default_avatar.png';
if($_POST["first_name"] && $_POST["last_name"] && $_POST["username"] && $_POST["email"] && $_POST["password"]) {
    echo $result->num_rows;
    if($result->num_rows == 0){

PHP返回该警告 - 警告:main():无法在

中获取mysqli_stmt

0 个答案:

没有答案