$this->loadModel('Product');
$this->set('products',$this->Product->find('list',array('product'=>array('products.name' => 'products.price'))));
$this->set(compact('products'));
我正在努力做到这一点,这样我就可以在我正在使用的功能中同时显示产品名称和价格。So when the drop down is selected, instead of just being "productname" it would be like "productname - $price".
我很确定这是所有需要查看的代码。