i have a table to with two fields: user1 and user2.
I have also this code to fetch the user2 column:
// Extraemos los amigos del usuario de la sesion.
$this->lista_amigos = Doctrine::getTable('FriendReference')
->createQuery('a')
->select('a.user2')
->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
())
->execute();
My problem: that code not only fecths the user2 column but also the
user1 column..
> How do you cycle within the resultset ?
> Doctrine has lazy loading so if you do $myresult['user1'] it will make
> __another__ query to fetch the column.
> On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> > Hi,
> > i have a table to with two fields: user1 and user2.
> > I have also this code to fetch the user2 column:
> > // Extraemos los amigos del usuario de la sesion.
> > $this->lista_amigos = Doctrine::getTable('FriendReference')
> > ->createQuery('a')
> > ->select('a.user2')
> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> > ->execute();
> > My problem: that code not only fecths the user2 column but also the
> > user1 column..
> How do you cycle within the resultset ?
> Doctrine has lazy loading so if you do $myresult['user1'] it will make
> __another__ query to fetch the column.
> On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> > Hi,
> > i have a table to with two fields: user1 and user2.
> > I have also this code to fetch the user2 column:
> > // Extraemos los amigos del usuario de la sesion.
> > $this->lista_amigos = Doctrine::getTable('FriendReference')
> > ->createQuery('a')
> > ->select('a.user2')
> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> > ->execute();
> > My problem: that code not only fecths the user2 column but also the
> > user1 column..
> How do you cycle within the resultset ?
> Doctrine has lazy loading so if you do $myresult['user1'] it will make
> __another__ query to fetch the column.
> On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> > Hi,
> > i have a table to with two fields: user1 and user2.
> > I have also this code to fetch the user2 column:
> > // Extraemos los amigos del usuario de la sesion.
> > $this->lista_amigos = Doctrine::getTable('FriendReference')
> > ->createQuery('a')
> > ->select('a.user2')
> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> > ->execute();
> > My problem: that code not only fecths the user2 column but also the
> > user1 column..
> How do you cycle within the resultset ?
> Doctrine has lazy loading so if you do $myresult['user1'] it will make
> __another__ query to fetch the column.
> On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> > Hi,
> > i have a table to with two fields: user1 and user2.
> > I have also this code to fetch the user2 column:
> > // Extraemos los amigos del usuario de la sesion.
> > $this->lista_amigos = Doctrine::getTable('FriendReference')
> > ->createQuery('a')
> > ->select('a.user2')
> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> > ->execute();
> > My problem: that code not only fecths the user2 column but also the
> > user1 column..
> How do you cycle within the resultset ?
> Doctrine has lazy loading so if you do $myresult['user1'] it will make
> __another__ query to fetch the column.
> On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> > Hi,
> > i have a table to with two fields: user1 and user2.
> > I have also this code to fetch the user2 column:
> > // Extraemos los amigos del usuario de la sesion.
> > $this->lista_amigos = Doctrine::getTable('FriendReference')
> > ->createQuery('a')
> > ->select('a.user2')
> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> > ->execute();
> > My problem: that code not only fecths the user2 column but also the
> > user1 column..
> How do you cycle within the resultset ?
> Doctrine has lazy loading so if you do $myresult['user1'] it will make
> __another__ query to fetch the column.
> On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> > Hi,
> > i have a table to with two fields: user1 and user2.
> > I have also this code to fetch the user2 column:
> > // Extraemos los amigos del usuario de la sesion.
> > $this->lista_amigos = Doctrine::getTable('FriendReference')
> > ->createQuery('a')
> > ->select('a.user2')
> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> > ->execute();
> > My problem: that code not only fecths the user2 column but also the
> > user1 column..
> How do you cycle within the resultset ?
> Doctrine has lazy loading so if you do $myresult['user1'] it will make
> __another__ query to fetch the column.
> On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> > Hi,
> > i have a table to with two fields: user1 and user2.
> > I have also this code to fetch the user2 column:
> > // Extraemos los amigos del usuario de la sesion.
> > $this->lista_amigos = Doctrine::getTable('FriendReference')
> > ->createQuery('a')
> > ->select('a.user2')
> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> > ->execute();
> > My problem: that code not only fecths the user2 column but also the
> > user1 column..
Andrés Lartigue Debián
Binova Services Informatiques
www.binova-it.fr +33 (0)3.44.37.08.85
P Pensez ŕ l’environnement, évitez si possible d’imprimer cet e-mail
-----Mensaje original-----
De: gunzip [mailto:spammm...@gmail.com] Enviado el: Lunes, 16 de Noviembre de 2009 06:32 p.m.
Para: doctrine-user
Asunto: [doctrine-user] Re: Trying to fetch a column
How do you cycle within the resultset ?
Doctrine has lazy loading so if you do $myresult['user1'] it will make
__another__ query to fetch the column.
On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> i have a table to with two fields: user1 and user2.
> I have also this code to fetch the user2 column:
> // Extraemos los amigos del usuario de la sesion.
> $this->lista_amigos = Doctrine::getTable('FriendReference')
> ->createQuery('a')
> ->select('a.user2')
> ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> ())
> ->execute();
> My problem: that code not only fecths the user2 column but also the
> user1 column..
> What am i doing wrong??
> Bye
> Javi
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To post to this group, send email to doctrine-user@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/doctrine-user?hl=.
> Andrés Lartigue Debián
> Binova Services Informatiqueswww.binova-it.fr > +33 (0)3.44.37.08.85
> P Pensez ŕ l’environnement, évitez si possible d’imprimer cet e-mail
> -----Mensaje original-----
> De: gunzip [mailto:spammm...@gmail.com]
> Enviado el: Lunes, 16 de Noviembre de 2009 06:32 p.m.
> Para: doctrine-user
> Asunto: [doctrine-user] Re: Trying to fetch a column
> How do you cycle within the resultset ?
> Doctrine has lazy loading so if you do $myresult['user1'] it will make
> __another__ query to fetch the column.
> On 16 Nov, 18:09, tirengarfio <tirengar...@gmail.com> wrote:
> > Hi,
> > i have a table to with two fields: user1 and user2.
> > I have also this code to fetch the user2 column:
> > // Extraemos los amigos del usuario de la sesion.
> > $this->lista_amigos = Doctrine::getTable('FriendReference')
> > ->createQuery('a')
> > ->select('a.user2')
> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId
> > ())
> > ->execute();
> > My problem: that code not only fecths the user2 column but also the
> > user1 column..
> > What am i doing wrong??
> > Bye
> > Javi
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To post to this group, send email to doctrine-user@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/doctrine-user?hl=.