Doctrine查询未执行

时间:2012-03-15 01:58:56

标签: doctrine symfony-1.4 doctrine-1.2 doctrine-query

尝试执行一直无法发生的Doctrine查询: 我的代码:

$q = Doctrine_Query::Create()->select('l.lid')->from('lessons l')->where('l.topic =?','Title of topic')

$result = $q->fetchOne() ; 

有趣的是,这会返回错误的列,不是l.lid而是l.someOtherColumn

所以不确定我在哪里搞砸了,你的评论和批评者都非常感激。

谢谢!

1 个答案:

答案 0 :(得分:0)

尝试使用Create('table_name t')代替 - > from()....

相关问题