is it possible to declare constants in /application/config/constant.php from a DB table?
I'm trying to do something like this.
$result = $this->db->select( 'attr, value' )->from( 'app_conf')->where( 'city', 53 )->or_where( 'city', -1 )->order_by( 'city' )->get();
$app_conf = $result->result_array();
// var_dump( $app_conf );
foreach( $app_conf as $row )
{
define( "_{$row['attr']}", $row['value'] );
}
but right now I have to do it in every controller I create, so duplicating code and requiring to do changes all over if needed, which seems unnecessary!