undefined function mysqli_stmt_init() php error

前端 未结 1 1815
渐次进展
渐次进展 2021-01-23 11:31

I\'m new to using php mysqli prepared statements. No matter what I try I always get this error message.

Fatal error: Call to undefined function mysqli_stmt_init(         


        
相关标签:
1条回答
  • 2021-01-23 11:55

    You don't need mysqli_stmt_init(). Just issue your prepared statement directly.

    if(mysqli_prepare($link, "SELECT * FROM users WHERE email=?")){
        mysqli_stmt_bind_param($email_query, "s", $email);
        mysqli_stmt_execute($email_query);
        mysqli_stmt_store_result($email_query);
        $exists_email = mysqli_stmt_num_rows($email_query);
        mysqli_stmt_close($email_query);
    }
    
    0 讨论(0)
提交回复
热议问题