[Catalyst] wrong generated SQL

2012-06-01 Thread Kenneth S Mclane
Can someone tell me why this: my $rs1 = $c-model('ORANGES::File')-search({'report_id' = $rptcode}, { rows = 1, page = $page, }); Results in the following SQL? SELECT COUNT( * ) FROM HCDB_TEST.FILE me WHERE ( report_id = ? ): '541861' When it used to

Re: [Catalyst] wrong generated SQL

2012-06-01 Thread Matthias Zeichmann
On Fri, Jun 1, 2012 at 6:55 PM, Kenneth S Mclane ksmcl...@us.ibm.com wrote: Can someone tell me why this: my $rs1 = $c-model('ORANGES::File')-search({'report_id' = $rptcode}, {                 rows = 1,                 page = $page,         }); Results in the following SQL? SELECT COUNT(

Re: [Catalyst] wrong generated SQL

2012-06-01 Thread Kenneth S Mclane
Matthias Zeichmann matthias.zeichm...@gmail.com wrote on 06/01/2012 01:04:58 PM: From: Matthias Zeichmann matthias.zeichm...@gmail.com To: The elegant MVC web framework catalyst@lists.scsys.co.uk Date: 06/01/2012 01:07 PM Subject: Re: [Catalyst] wrong generated SQL On

Re: [Catalyst] wrong generated SQL

2012-06-01 Thread Matthias Zeichmann
On Fri, Jun 1, 2012 at 8:10 PM, Kenneth S Mclane ksmcl...@us.ibm.com wrote: I did use .next in my template, but this code should (and did) return 4 rows. I am also using a pager on the resultset, which still shows 4 pages when I display the template, however I get no column data, just the

Re: [Catalyst] wrong generated SQL

2012-06-01 Thread Kenneth S Mclane
Matthias Zeichmann matthias.zeichm...@gmail.com wrote on 06/01/2012 01:25:23 PM: From: Matthias Zeichmann matthias.zeichm...@gmail.com To: The elegant MVC web framework catalyst@lists.scsys.co.uk Date: 06/01/2012 01:26 PM Subject: Re: [Catalyst] wrong generated SQL On

Re: [Catalyst] wrong generated SQL

2012-06-01 Thread Frank Schwach
The count query is issued to get a total row count for the pager. In your template, is it possible that you currently just display the number of results from the pager instead of the actual resultset data? As soon as you ask the resultset for data you should see another query being issued for