Re: Issue with getNumRows

2011-05-03 Thread Rishab Jain
e cake pagination. I just wanted to know if there's another function just like getNumRows() which could provide me with the total rows selected for that particular where clause. regards, Rishab On Tue, May 3, 2011 at 10:47 AM, ShadowCross wrote: > This isn't a CakePHP bug. The Mo

Re: Issue with getNumRows

2011-05-02 Thread ShadowCross
This isn't a CakePHP bug. The Model::getNumRows() function returns the number of rows returned in the last query. Since you are using the limit clause, the number of rows in the query is less than or equal to the limit (10 rows in your example). To get the actual number of rows that cou

Re: Issue with getNumRows

2011-05-02 Thread jairishab
Nobody has any idea about this? Rishab Sent from BlackBerry® on Airtel -Original Message- From: jairis...@gmail.com Date: Mon, 2 May 2011 14:41:24 To: cake-php Reply-To: jairis...@gmail.com Subject: Issue with getNumRows Hi all, I am working on my own pagination in my setup. It works

Issue with getNumRows

2011-05-02 Thread jairishab
calculate this I need to execute the getNumRows() function on each request. But when I do that, I get 10 as the result of that function. Though, the expected result which normally mysql returns for SQL_CALC_FOUND_ROWS is '40'. Can anybody help me fixing this cakephp bug? Rishab

Re: getNumRows()

2009-06-03 Thread PaulMan
I'm looking for the number of rows in Catalog not Product. $this->Product->Catalog->getNumRows() On May 29, 8:32 pm, Miles J wrote: > Why would it be 3, if the rows are 100? --~--~-~--~~~---~--~~ You received this message because you are subscri

Re: getNumRows()

2009-05-29 Thread Miles J
Why would it be 3, if the rows are 100? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to ca

getNumRows()

2009-05-29 Thread PaulMan
Hello Everybody, On Product Model public $hasAndBelongsToMany = array('Category' ,'Catalog'); On Products_Controller $this->data=$this->Product->find('all',array('conditions'=>array ('Product.active'=>1),'limit'=>&

getNumRows() not work!

2008-07-12 Thread Gianluca Gentile
My code: $result = $this->Printer->findAll("Printer.id = '".$this- >data['InksPrinter']['printer_id']."' AND Printer.printer = '".$this- >data['InksPrinter']['printer']."' AND Printer.supplier_id

Query Caching Using query($sql) Breaks getNumRows()

2007-03-16 Thread ClockHistory
I am using Cakephp 1.1.11.4064 and a Postgresql database. I was having trouble in my application where the value returned from getNumRows() was incorrect in certain places. The problem turned out to be Cake's query caching. Example code $sql_1 = "sql statement 1;"; $parent_r

Query Caching Using query($sql) Breaks getNumRows()

2007-03-16 Thread ClockHistory
I am using Cakephp 1.1.11.4064 and a Postgresql database. I was having trouble in my application where the value returned from getNumRows() was incorrect in certain places. The problem turned out to be Cake's query caching. Example code: $sql_1 = "sql statement 1;"; $parent