Re: [symfony-users] Re: sfDoctrinePager - sorting items

2010-09-30 Thread Michal Adamkiewicz
Thank you! That helped me figure it out. One more thing which had to be done: in the indexSuccess template I had to pass the 'title' variable to the pager. Now it looks like that: indexSuccess.php: $pager, 'internal_uri' => '@jobs', 'title' => $title)) ?> On Thu, Sep 30, 2010 at 4:38 P

[symfony-users] Re: sfDoctrinePager - sorting items

2010-09-30 Thread guiguiboy
Hi, Don't you forget a title parameter in your link ? Try in your action : $this->title = $request->getParameter('title'); in your template : On 29 sep, 21:02, coda wrote: > Hello, > I'm following Jobeet tutorial and want to add some sorting options to > the sfDoctrinePager > > That's my co

[symfony-users] Re: sfDoctrinePager creates loads of unneeded queries

2009-11-14 Thread Jonathan Franks
Ok - found this in trac .. http://trac.symfony-project.org/ticket/7541 Don't really understand why but getResults() as $object): ?> will execute the query twice and... will execute the query once. On 11 Nov 2009, at 23:36, Jonathan wrote: > > I just realised that I used.

[symfony-users] Re: sfDoctrinePager creates loads of unneeded queries

2009-11-11 Thread Jonathan
I just realised that I used... select('m.id') when I should have used... select('m.*') This reduces the number of queries a lot but it still seems to make more than needed Note that the last two queries are repeated. SET NAMES 'UTF8' 0.00s, "doctrine" connection SELECT COUNT(*) AS num_r

[symfony-users] Re: sfDoctrinePager

2008-10-02 Thread Jonathan Wage
Can you create a ticket and a standalone test showing the problem? http://trac.doctrine-project.org - Jon On Wed, Oct 1, 2008 at 1:04 AM, Bertrand Zuchuat <[EMAIL PROTECTED]>wrote: > > Hi Jon, > > This part isn't good. Look in GROUP BY, g4 isn't exist in FROM (g3). > > I use Doctrine_Pager with

[symfony-users] Re: sfDoctrinePager

2008-09-30 Thread Bertrand Zuchuat
Hi Jon, This part isn't good. Look in GROUP BY, g4 isn't exist in FROM (g3). I use Doctrine_Pager with the same query and it work. Thanks Bertrand Le 30 sept. 08 à 18:57, Jonathan Wage a écrit : > SELECT DISTINCT g3.id FROM gallery g3 GROUP BY g4.gallery_id LIMIT 5 > Sep 29 19:48:45 symfony

[symfony-users] Re: sfDoctrinePager

2008-09-30 Thread Jonathan Wage
I am not sure why the query is failing. If you have that column in gallery_picture then it should be fine. Have you played with the query in mysql directly and tried to figure out what is wrong with it? Maybe that group by column needs to be in the select? - Jon On Mon, Sep 29, 2008 at 12:50 PM,

[symfony-users] Re: sfDoctrinePager

2008-09-29 Thread Bertrand Zuchuat
The log: Sep 29 19:48:45 symfony [info] {sfDoctrine Query} executeQuery : SELECT COUNT(DISTINCT g.id) AS num_results, COUNT(g2.gallery_id) AS g2__0 FROM gallery g LEFT JOIN gallery_picture g2 ON g.id = g2.gallery_id GROUP BY g2.gallery_id Sep 29 19:48:45 symfony [info] {sfDoctrine Query} ex

[symfony-users] Re: sfDoctrinePager

2008-09-29 Thread Jonathan Wage
You will need to use mysql query logging or the doctrine connection profiler to view the sql it executes. - Jon On Mon, Sep 29, 2008 at 12:32 PM, Bertrand Zuchuat <[EMAIL PROTECTED]>wrote: > Hi Jon, > I don't show SQL because i have an error before. > > [Doctrine_Connection_Mysql_Exception]SQLST

[symfony-users] Re: sfDoctrinePager

2008-09-29 Thread Bertrand Zuchuat
Hi Jon, I don't show SQL because i have an error before. [Doctrine_Connection_Mysql_Exception] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'g4.gallery_id' in 'group statement' My schema: --- Gallery: tableName:gallery actAs: Timestampable: ~ I18n: fi

[symfony-users] Re: sfDoctrinePager

2008-09-29 Thread Jonathan Wage
Does that column exist on the GalleryPicture model/table? Can you show the SQL it executes and your model/schema definitions? - Jon On Fri, Sep 26, 2008 at 8:15 AM, Bertrand Zuchuat <[EMAIL PROTECTED]>wrote: > > Hi, > > I have an error with sfDoctrinePager if i use groupBy into my request. > >