Rss Feed
Tweeter button
Facebook button
Technorati button
Reddit button
Myspace button
Linkedin button
Webonews button
Delicious button
Digg button
Flickr button
Stumbleupon button
Newsvine button
Youtube button

Been struggling with something lately – and that is to get the select boxes on the edit / add views of a cakePHP app to show the correct thing.

For instance I have a Countries table that has an association to the UserAddress model, to get this association and pull out the country name rather than the coutnry_id I have to do the following:

$countries = $this->UserAddress->Country->find('list', array('fields' => array('Country.country')));

Sometimes CakePHP automagic takes away a bit of common sense from us :)

Post comment

Sing To The World

Situated in Coleshill Birmingham, Sing To The World is the number 1 premier Karaoke company. We provide Karaoke Custom Discs, Karaoke Hardware and Online Streaming Karaoke. Hopefully this blog will give you a bit of insight into our daily lives in the office - you might even get some sneaky offers if you look closely ;)