$this->db->load('db'); $this->db->get('table');
in system/config/development.php ( for production : system/config/development.php )
public static $autoload=array("db");
SELECT id FROM *table*
code will be
$result = $this->db->select('id')->get('table'); if($this->db->count > 0) { echo $result[0]->id; }
There was an error while loading. Please reload this page.