[eluser]bonatoc[/eluser]
I'm very interested in how you guys deal with ENUM switches on sub-objects.
Because obviously there can be many DB items which one would like to retrieve based on their 'ON','OFF' statuses.
Surely there must be a subquery technique which could avoid writing this :
Code:
// Get active currencies
$currencies = new Currency;
$currencies->where('Status', 'A')->get();
// Build an array to pass to the form field
foreach ($currencies as $currencies_key)
{
$currency_id = $currencies_key->id;
$currency_string = $currencies_key->CurrencyName;