hello,

I met a weird problem when using doSelectJoinXXX() method.
I have 2 table, USER and CONNECT, CONNECT.foreignkey(userid)=USER.id,and I
use the code below to get the username

$c=new Criteria;
$c->add(ConnectPeer::USERID,$userid);
$r=ConnectPeer::*doSelectJoinUser($c)*;

foreach($r as $re){
    $array=array('uname'=>*$re->getUser()->getUname()*);
}

It can get the username correctly, but when I look at the symfony SQL
queries icon,it seems that *doSelectJoinXXX() *didn't work, every username I
got need one more SQL queries(because it shows 1000 queries use in this
code, actually if I use Join method, it just needs 1 query), just like *
doSelect() *function. More weird was when I use var_dump() to check $r, it
appears that all the results( USER and CONNECT) were stored in it. So can
anybody tell me the correct method to get the result out of $r.






------------------------------------------
         少许诺多兑现
------------------------------------------

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@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