Advertisement
kotvalera83

CI helper+database

Apr 14th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.21 KB | None | 0 0
  1. function yourHelperFunction(){
  2.         $ci=& get_instance();
  3.         $ci->load->database();
  4.  
  5.         $sql = "select * from table";
  6.         $query = $ci->db->query($sql);
  7.         $row = $query->result();
  8.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement