model
<?php defined ( 'BASEPATH' ) or exit ( 'No direct script access allowed' ); class my_model extends CI_Model { public function insert_post ( $data ) { $this -> db -> insert ( 'post' , $data ); if ( $this -> db -> affected_rows () > 0 ) { return $this -> db -> insert_id (); } else { return false ; } } public function get_category () { $query = $this -> db -> get ( 'characters' ); return $query -> result (); } public function get_tag1 () { $query = $this -> db -> get ( 'tags' ); return $query -> result (); ...