我的mysqli_num_rows和mysqli_stmt_bind_result()有什么问题?

时间:2015-05-26 14:11:36

标签: php mysql

这些错误意味着什么?

警告:mysqli_num_rows()期望参数1为mysqli_result,第28行的C:\ Apache24 \ htdocs \ SP \ r.php中给出布尔值

警告:第36行的C:\ Apache24 \ htdocs \ SP \ r.php中mysqli_stmt_bind_result()的参数计数错误

 $password = password_hash($email, PASSWORD_BCRYPT, $options);
 $count = mysqli_query($connection, "SELECT email FROM pawnshop WHERE email='".$email."'");

    if(mysqli_num_rows($count) < 1)
    {

$sql = mysqli_prepare($connection, "INSERT INTO pawnshop ".
            "(Pawnshop_Name, Street, Barangay, City, DTI_Permit_No, Mayor_Permit_No, Firstname, Middlename, Lastname, Contact_Number, Email_Address, Password, Activation) ".
            "VALUES ".
            "(?,?,?,?,?,?,?,?,?,?,?,?,?)");
            mysqli_stmt_bind_param($sql, "ssssiisssssss", $pawnshopName, $street, $barangay, $city, $dtiPermitNo, $mayorPermitNo, $firstName, $lastName, $middleName, $contactNumber, $email, $password, $activation);
            mysqli_stmt_execute($sql);
            mysqli_stmt_bind_result($sql);
            mysqli_stmt_close($sql);
            mysqli_close($connection);

0 个答案:

没有答案