Hello:
I am trying to run a query on two tables and paginate the results. My
db is massive and will crash the server if all results are pulled.
sfDoctrinePager seems to limit the results when I just pull straight
from a table, but when I try to set a query it lags and then crashes.
Do I need to put a LIMIT and OFFSET on the query I am running, and
then send it to pagination? Here is the code:

$query=Doctrine_Query::create()
->select('c.name, d.phone')
->from('company c, companyDetails d')
->where('c.companyId=d.companyId');

$pager = new sfDoctrinePager('company',10);
$pager->setQuery($query);
$pager->setPage(1);
$pager->init();
$this->companys=$pager->getResults();

Thanks.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to