thanks jaremy, i was expecting ur reply, i had read ur last posts regarding this issue and i got the answer there itself, thank u keep solving the issues of newcomers like me
best regards andy (trying to start a bakery) On Jan 28, 11:33 am, Jeremy Burns | Class Outfit <[email protected]> wrote: > Try adding: > > var $displayField = 'title'; > > ...to the top of your model. > > PS: I presume the 'name' field exists in the table? > > Jeremy Burns > Class Outfit > > [email protected]http://www.classoutfit.com > > On 28 Jan 2011, at 06:28, andy_the ultimate baker wrote: > > > hi bakers, > > good morning to all but it is not going good for me, > > since morning i m trying to resolve one error > > > "Unknown column 'State.name' in 'order clause'" > > > but i m not getting where exactly i m wrong, > > can anyone suggest me the solution on it, > > > a query is coming out in error is as fallows > > > Query: SELECT `State`.`id`, `State`.`title` FROM `states` AS `State` > > WHERE 1 = 1 ORDER BY `State`.`name` ASC > > > and my controller is doing this > > > function add() { > > > $states = $this->State->find('list'); > > //print_r($states);exit; > > $cities = $this->City->find('all', > > array('conditions'=>array($states))); > > $this->set(compact('states', 'cities')); > > > } > > > and my model is as fallows > > > <?php > > class State extends AppModel { > > var $name = 'State'; > > var $order = "State.name ASC"; > > } > > ?> > > > -- > > Our newest site for the community: CakePHP Video > > Tutorialshttp://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
