Saw a couple of searches coming into my site looking for Cakephp generateList. As you can see from the cakephp cookbook, the generateList method has been deprecated in 1.2 and has now been changed to find(‘list’).
Or you can simplify your conversion by placing the following in /app/app_model.php
function getlist ($cond=null,$order=null,$limit=null,$key=null,$val=null) { return $this->find("list",array( 'conditions' => $cond, 'order' => $order, 'limit' => $limit, 'fields' => array(str_replace('{n}.','',$key), str_replace('{n}.','',$val)) )); }
Have fun baking!
ben says
Thanks for the info, updating a very old (obviously!) cakephp app and I wasn’t sure what to do about these generate lists.