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
Jonathan Wage  
View profile
 More options 16 May, 18:03
From: "Jonathan Wage" <jonw...@gmail.com>
Date: Fri, 16 May 2008 12:03:22 -0500
Local: Fri 16 May 2008 18:03
Subject: Re: [doctrine-dev] Problem with Aggregate function via Doctrine_Query.

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 Wage
http://www.jwage.com
http://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