我对Doctrine非常陌生,正在做一个项目,当我调用这个函数时,我遇到了一个问题:
public function authentification($login,$passe) {
$q = Doctrine_Query::create()
->select('count(user.id)')
->from("user")
->where("login = ?" . $login . "'")
->andWhere("passe = ?" . $passe . "'")
->bindValue(1, $login)
->bindValue(2, $passe);
return $q->count();
}
我得到这个错误:
调用未定义方法Doctrine_Query::bindValue()
在Doctrine_Query
中没有bindValue
方法。像这样使用:
$q = Doctrine_Query::create()
->select('count(user.id)')
->from("user")
->where("login = ?", $login)
->andWhere("passe = ?", passe);
你可以在这里找到文档