dbforge codeigniter drop if exists code example
Example 1: codeigniter dbforge add index
$sql = "CREATE INDEX your_index_name ON table_name(field_name)";
$this->db->query($sql);
Example 2: codeigniter create table
$forge->createTable('table_name', TRUE);
// gives CREATE TABLE IF NOT EXISTS table_name