Google Groups Home
Help | Sign in
Message from discussion Problem with Aggregate function via Doctrine_Query.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Mylith  
View profile
 More options 19 May, 08:48
From: Mylith <myl...@gmail.com>
Date: Mon, 19 May 2008 00:48:32 -0700 (PDT)
Local: Mon 19 May 2008 08:48
Subject: Re: Problem with Aggregate function via Doctrine_Query.
Thanks for reply Jon,

Simple print_r($query->toArray(true) prints content only for "Twr"
table (no nesting, wired? since we have $deep = true), and there is no
column "mdd".

Greetings,
Mylith

On 16 Maj, 19:03, "Jonathan Wage" <jonw...@gmail.com> wrote:

> Do a print_r($query->toArray(true)); and you will see the path to the value.

> - Jon

> On Fri, May 16, 2008 at 9:50 AM, Mylith <myl...@gmail.com> wrote:

> > Hello,

> > Please take a look, some code for example:

> > $query = Doctrine_Query::create()
> > ->select('t.*, MIN(f.date) AS mdd')
> > ->from('Twr t')
> > ->leftJoin('t.ZmoPz zp, zp.FkPz fp, fp.Fk f')
> > ->where('t.id = ?', 14843)
> > ->groupby('t.id, t.code, t.name')
> > ->orderby('t.nameASC')
> > ->execute();

> > $query[0]->contains('mdd') - FALSE
> > $query[0]->ZmoPz[0]->contains('mdd') - FALSE
> > $query[0]->ZmoPz[0]->FkPz[0]->contains('mdd') - FALSE
> > $query[0]->ZmoPz[0]->FkPz[0]->Fk->contains('mdd') - FALSE

> > How can I find value :)? Im using profiler, raw query was tested on DB
> > and MIN(f.date) has value, after large var_dump of $query value is
> > stored in some object, but there is no way to get it. Maybe its some
> > kind of bug with access to value.

> > Thanks for advise,
> > Mylith

> --
> Jonathan Wagehttp://www.jwage.comhttp://www.centresource.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google