Welcome Guest, Not a member yet? Register   Sign In
Use ezSQL with codeigniter nativly
#1

[eluser]jv2222[/eluser]
Just a quick note to say I've ported ezSQL to work with native codeigniter functions.

So, basically it means you can use ezSQL as you are used to working with it, but it uses the default codeigniter connectors to access the DB.

You can get it here: http://ezsql.jvmultimedia.com/

Once installed you can use like so in your controller functions...

Code:
function index()
{
   global $db;
   $db->get_var("SELECT CURDATE()");
   $db->debug();
}
    
or you can do this...
    
function index()
{
   $this->ezsql->get_var("SELECT CURDATE()");
   $this->ezsql->debug();
}


Hope someone finds it useful!

Cheers,
Justin Smile




Theme © iAndrew 2016 - Forum software by © MyBB