教条中的分页

时间:2012-06-06 18:48:12

标签: zend-framework extjs doctrine

我在我的项目中使用了Doctrine 1.2.4,Zend Framework 11和ExtJS 3.4。所以我的数据库中有数千个记录,如学生。所以我使用DQL语言检索这些数据,然后我需要对这些数据进行分页,并使用Doctrine_Pager。 在大多数情况下,检索数据没有任何问题,但是当我在DQL中添加where子句并使用类似的东西时

where("st.name ~* 'a'")

并返回一个Doctrine错误。我怎么解决呢?

SQLSTATE[42883]: Undefined function: 7 ERROR: el operador no existe: text ~* st_name

1 个答案:

答案 0 :(得分:1)

你的where语句错了,你不应该使用where st.name like '*a'吗?