call to a member function execute() on a non-object

前端 未结 4 2117
北荒
北荒 2020-12-11 20:28

My script containing that error is this:

$stmt = $this->db->prepare(\'SELECT libelle,activite,adresse,tel,lat,lng FROM etablissements where type IN (\'         


        
4条回答
  •  执念已碎
    2020-12-11 21:05

    Swap the statement bind and execute and replace result with param, It will work fine

    $stmt = $this->db->prepare('SELECT libelle,activite,adresse,tel,lat,lng FROM etablissements 
    where type IN ('.$in_list.')');
    $stmt->bind_param($libelle,$activite,$adresse,$tel,$lat,$lng);
    $stmt->execute();
    

提交回复
热议问题