Re: adding join conditions with DB_DataObject

From: Date: Fri, 04 Feb 2005 15:53:20 +0000
Subject: Re: adding join conditions with DB_DataObject
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17387@lists.php.net to get a copy of this message
Then I don't understand the meaning of the request. This Attribute = "Framed-IP-Address" should be in WHERE ! e.g. for mysql, from manual: "You should generally not have any conditions in the |ON| part that are used to restrict which rows you want in the result set, but rather specify these conditions in the |WHERE| clause." à+ -- bertrand Gugger (toggg) Ian P. Christian wrote: >On Friday 04 February 2005 15:36, bertrand Gugger wrote: > > >>Are the " extra ? Do you like to link on a constant ? >>Excuse me if it's a bloody question. >> >> > >Yes, I intend to join on a condition where Attribute.Attribute is equal to a >string "Framed-IP-Address". > >This is what i'm trying to achive: > >SELECT > raduser.* , radreply.Value as ip >FROM raduser >LEFT JOIN radreply AS radreply > ON radreply.UserName=raduser.username > AND Attribute = "Framed-IP-Address" >WHERE raduser.customerId LIKE "%MAS02%"; > >Kind Regards, > > >

« previous php.pear.general (#17387) next »