Re: Re: dataObject multiple links from a column

From: Date: Sun, 11 Jan 2004 18:06:15 +0000
Subject: Re: Re: dataObject multiple links from a column
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10117@lists.php.net to get a copy of this message
Just say me if I'm wrong : the "full stop" syntax in dbname.links.ini isn't available for joins and I cannot use the same col to make several joins. Example [sales] ; for autoloading the car object into $sales->_car_id car_id = car:id ; for autoloading the part number object into $sales->_car_id_partnum car_id.partnum = part_numbers:car_id Allows me to do $sales->getLinks();//and have $sales->_car_id_partnum AND $sales->_car_id But doesn't allow me to do $part_numbers->type = $type; $sales->joinAdd($car); $sales->joinAdd($part_numbers);//DB error unknown and sql make join ON part_numbers.car_id.partnum (which doesn't exists) I only can do : $sales->joinAdd($car); ============= work around (with car instead of sales used as central point of join) ==== [part_numbers] car_id = car:car_id //and $part_numbers->type = $type; $car->joinAdd($part_numbers); $car->joinAdd($sales); $car->find(); while($car->fetch()){ //$car contains all rows from the three objects with part_numbers.type=$type } Regards, Didier

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