googoli
شنبه 15 شهریور 1393, 19:59 عصر
سلام
من می خوام با ارتباطات ریز رکورد های جدول دوم رو در بیارم
تا الان برای این که به خواستم برسم از کد زیر استفاده می کردم و به جواب هم میرسیدم
$tiny = Material::model()->with(array('Minfo'=>array('condition'=>'material_id= 4')))->findAll();
ولی الان نمی دونم چرا این کد جوابم رو نمیده
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'Minfo' => array(self::MANY_MANY, 'Materialinfo', '{{relmaterial}}(material_id, materialInfo_id)'),
);
}
این هم اروری که میده
من می خوام با ارتباطات ریز رکورد های جدول دوم رو در بیارم
تا الان برای این که به خواستم برسم از کد زیر استفاده می کردم و به جواب هم میرسیدم
$tiny = Material::model()->with(array('Minfo'=>array('condition'=>'material_id= 4')))->findAll();
ولی الان نمی دونم چرا این کد جوابم رو نمیده
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'Minfo' => array(self::MANY_MANY, 'Materialinfo', '{{relmaterial}}(material_id, materialInfo_id)'),
);
}
این هم اروری که میده