Share my DB class for CI |
[eluser]vps4[/eluser]
It's simple and useful MySQL DB class. I modify it from WordPress2.5.1 wp-db.php It also automatic load DB config from CI config file. Usage: just put it in your CI app library folder, usually in system/application/libraries and name Db.php now , you can load the library anywhere, or set it automatic load in autoload config file Code: $this->load->library('db'); these method is better than CI database, only ONE line code. Code: $this->db->get_var($sql); enjoy it!!! I can't post the code to here, because it's so long please get it from http://www.21andy.com/blog/20080607/1156.html anyway, sorry for my poor english. |
Welcome Guest, Not a member yet? Register Sign In |