Is user1 the primary key, or part of the primary key for this table?
Doctrine always includes the primary keys in it's hydration since it
needs them to organise things.

You could try:

$this->friend_list = Doctrine::getTable('FriendReference')
      ->createQuery(')
      ->from("FriendReference a INDEXBY a.user2")
      ->select('a.user2')
      ->where("a.user1 LIKE ?", '1')
      ->execute();

I would recommend that you don't have this kind of code in your action
though... Create a method that you can use $this->friend_list =
Doctrine::getTable('FriendReference')->getSecondFriends() for example
- then as Gareth suggests you can apply some sorting logic and stuff
in that method and your actions can always just refer to the method
when they need the data.

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to