Call to undefined method PDO::bindParam()

后端 未结 3 2024
一整个雨季
一整个雨季 2020-12-11 15:58

Can someone tell me why I am getting this error? Call to undefined method PDO::bindParam()

Here is what I have, taken right off of PHPs site for stored procedures

3条回答
  •  时光取名叫无心
    2020-12-11 16:17

    $stmt = db::getInstance(); 
    $query = $stmt->prepare("CALL delete(?)"); 
    $query->bindParam(2122, $return_value, PDO::PARAM_STR, 4000); 
    $query->execute();
    

    You need to be calling PDOStatment::bindParam. The prepare method returns the PDOStatment Object. The PHP PDO/PDOStatment manuals should help.

提交回复
热议问题