Catchable fatal error: Object of class mysqli_stmt could not be converted to string

前端 未结 2 1605
不思量自难忘°
不思量自难忘° 2020-12-07 03:39

I\'m new to PHP OOP so this question must be quite dumb. I\'m unable to create an SQL query through PHP. I\'ve read the code many times but I\'m unable to find any discrepa

2条回答
  •  借酒劲吻你
    2020-12-07 03:50

    you cant echo this

    echo $stmt_chk_email;

    you maybe want to echo this

         $stmt_chk_email = $con->prepare('SELECT column1 ,column2,... FROM `user_information` WHERE `Email` = ?');
         $stmt_chk_email->execute();
         $stmt_chk_email->store_result();
         $stmt_chk_email->bind_result($column1 ,$column2,.....);
         $stmt_chk_email->fetch();
      echo $column1;
      echo $column2 ;
      .....
    

提交回复
热议问题