0

I'm working with prepare on statement but i get this error:

Call to a member function bind_param() on boolean

public function getUtenteInfo($conn,$email,$password){
$sql = "SELECT utenti.cognome "
    . "FROM utenti"
    . "INNER JOIN agenzia "
    . "ON agenzia.ID_AGENZIA = utenti.FK_AGENZIA "
    . "INNER JOIN agenti "
    . "ON agenti.ID_AGENTE = utenti.FK_Agente         "
    . "where  (utenti.EMAIL = ? )";
echo $sql;
    $stmt = mysqli_prepare($conn, $sql);
    $stmt->bind_param('ss',$email,$password);
    $stmt->execute();
    $risultato = $stmt->get_result();     //esecuzione della query
Tech Spot
  • 464
  • 3
  • 10
  • 2
    If you echo `$sql` you will see you are missing a space between `utenti` and `INNER JOIN` – Nick Apr 23 '20 at 09:25
  • You are also passing an email and password while your query only uses the email. – Ivar Apr 23 '20 at 09:26

0 Answers0