mysql - Doctrine LIMIT Syntax Error? -



mysql - Doctrine LIMIT Syntax Error? -

'[syntax error] line 0, col 71: error: expected end of string, got 'limit''

here's code:

public function getlatestchapters() { homecoming $this->_em->createquery('select c, m models\chapter c bring together c.manga m order c.createdate limit 10')->getresult(); }

what posibly problem this? how can utilize limit in doctrine?

i using doctrine 2

seems there no limit/offset in dql anymore.

$qb = $em->createquerybuilder(); //.. build query $q = $qb->getquery(); $q->setfirstresult($offset); $q->setmaxresults($limit); $result = $q->getresult();

mysql doctrine

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -