如何从给定的代码得到$名new1值如何控制在CakePHP中获取值
$heroprofile = $this->Profile->find('all', array('conditions' => array('Profile.Person_name' => $album, 'Profile.Category' => 'Movies')));
//$this->set('movies',$this->Moviemaster->find('all',array('conditions' => array($new => $album))));
$this->set('heroprofile', $heroprofile);
foreach ($heroprofile as $value) {
$new1 = $value['Profile']['Person_type'];
echo $new1;
}
$this->set('coll', $this->Moviemusic->find('all', array('fields' => array('DISTINCT(Moviemusic.type)'), 'conditions' => array($new1 => $album), 'limit' => 4, 'order' => 'rand()')));
你应该做**的print_r($ heroprofile)** – Girish
你想在这里到底是什么?或者你有任何错误? –
实际上我需要从$ heroprofile获得一个值..并且需要将该值放在另一个查询中查找相同页面 – user3530708