CodeExplorer FetchAll example
protected function values() { $values =
[];
$result =
$this->
prepareQuery()->
execute()->
FetchAllAssoc('realm_key'
);
foreach ($result as $variable_store) { $values[]['language'
] =
$variable_store['realm_key'
];
} $result =
$this->
prepareQuery()->
execute()->
FetchAll();
foreach ($result as $variable_store) { foreach ($values as $key =>
$value) { if ($values[$key]['language'
] ===
$variable_store['realm_key'
]) { if ($variable_store['serialized'
]) { $values[$key][$variable_store['name'
]] =
unserialize($variable_store['value'
]);
break;
} else { $values[$key][$variable_store['name'
]] =
$variable_store['value'
];
break;
} } protected function values() { $values =
[];
$result =
$this->
prepareQuery()->
execute()->
FetchAllAssoc('language'
);
foreach ($result as $i18n_variable) { $values[]['language'
] =
$i18n_variable->language;
} $result =
$this->
prepareQuery()->
execute()->
FetchAll();
foreach ($result as $i18n_variable) { foreach ($values as $key =>
$value) { if ($values[$key]['language'
] ===
$i18n_variable->language
) { $values[$key][$i18n_variable->name
] =
unserialize($i18n_variable->value
);
break;
} } } return $values;
}