Hi I am trying to defining constants from mysql database, but could not load the database in codeigniter config file.
$db =$CI->load->database();
$query = $db->get('constants');
foreach( $query->result() as $row ){ define($row->title, $row->value); }
But it is throwing me an error "Undefined variable: CI"