Configuration Table
I want to create a component that will access a configuration table I created. How would I let the component access a MySQL table that does not belong to a controller? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Configuration Table
Er.. create a model for it and read previous posts? http://groups.google.com/group/cake-php/browse_thread/thread/cebf2f5728fac410/163a45cd882614c6?lnk=gstq=AD7sixrnum=1#163a45cd882614c6 Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Configuration Table
We are edging into vampire teritory here ;). No. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Configuration Table
Right I have that done, now I need to get the data into a cleaner assoc array. Its coming out like this: Array ( [0] = Array ( [Configuration] = Array ( [key] = sc_countries [value] = US,CA [group] = language_control [description] = Countries for which content will be provided, content includes TV Listings, Network Details. Only list countries which will be officially supported by the site. [title] = Supported Content Countries ) ) [1] = Array ( [Configuration] = Array ( [key] = title [value] = Sitcom Spy [group] = site [description] = The title of the site, displayed throughout site. [title] = Site Title ) ) ) When I'd rather have something like: Array ( [sc_countries Array ( [key] = sc_countries [value] = US,CA [group] = language_control [description] = Countries for which content will be provided, content includes TV Listings, Network Details. Only list countries which will be officially supported by the site. [title] = Supported Content Countries ) [title ] = Array ( [key] = title [value] = Sitcom Spy [group] = site [description] = The title of the site, displayed throughout site. [title] = Site Title ) ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Configuration Table
function transform($data) { $config=array(); foreach ($data as $row) $config[$row['key']]=$row; return $config; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---