Re: [symfony-users] doctrine2 numRows

2011-05-16 Thread Marco Pivetta
Sergio, don't worry about the two queries. Even on MySQL it is OFTEN true that using SQL_CALC_FOUND_ROWS is slower than using two different queries. Don't really know why, but I suppose it has to do with internal optimization issues... Marco Pivetta @Ocramius http://ma

Re: [symfony-users] doctrine2 numRows

2011-05-16 Thread Vincent Lechemin
Just use the php function count on the results, it is O(1). -- Vincent -- 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

Re: [symfony-users] doctrine2 numRows

2011-05-13 Thread sergio
: [symfony-users] doctrine2 numRows As far as I know, that is not supported by all vendors (see SQLite), thus not by Doctrine 2. You will have to add a COUNT() somewhere :) Marco Pivetta @Ocramius <http://twitter.com/Ocramius> http://marco-pivetta.com On 13 May 2011 18:33, SergioAlbatronic wrote:

Re: [symfony-users] doctrine2 numRows

2011-05-13 Thread Marco Pivetta
As far as I know, that is not supported by all vendors (see SQLite), thus not by Doctrine 2. You will have to add a COUNT() somewhere :) Marco Pivetta @Ocramius http://marco-pivetta.com On 13 May 2011 18:33, SergioAlbatronic wrote: > Hi, can someone tell me how I

[symfony-users] doctrine2 numRows

2011-05-13 Thread SergioAlbatronic
Hi, can someone tell me how I can know the number of rows in a query. Like mysql_num_rows() function. Thanks in advance. -- 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 Goo