Welcome Guest, Not a member yet? Register   Sign In
PDO in Codeigniter
#5

[eluser]Ickes[/eluser]
[quote author="kgill" date="1246587626"]I just hacked DB.php, basically everything between:

// Load the DB classes. Note: Since the active record class is optional

and just before the return statement I commented out and replaced with:

$DB =& new PDO($params['dbdriver'].':host='.$params['hostname'].';dbname='.$params['database'], $params['username'], $params['password']);

It's a quick and dirty hack but it got me what I wanted, $this->db gives me my PDO object.[/quote]

Thanks. I believe this is what I was looking for.

So to make a call I would then do something like
$this->db->prepare(....);
$this->db->bindParam(...);
$this->db->execute();

?

Again, sorry for being a Noob. Also, if anyone else has any other ideas on implementing PDO, I'd love to hear it.

Thanks.


Messages In This Thread
PDO in Codeigniter - by El Forum - 07-02-2009, 01:05 PM
PDO in Codeigniter - by El Forum - 07-02-2009, 01:12 PM
PDO in Codeigniter - by El Forum - 07-02-2009, 01:44 PM
PDO in Codeigniter - by El Forum - 07-02-2009, 03:20 PM
PDO in Codeigniter - by El Forum - 07-03-2009, 04:09 PM
PDO in Codeigniter - by El Forum - 07-04-2009, 09:42 AM
PDO in Codeigniter - by El Forum - 07-04-2009, 10:20 AM
PDO in Codeigniter - by El Forum - 07-06-2009, 11:35 AM
PDO in Codeigniter - by El Forum - 07-06-2009, 12:02 PM
PDO in Codeigniter - by El Forum - 07-06-2009, 12:22 PM
PDO in Codeigniter - by El Forum - 07-06-2009, 12:31 PM
PDO in Codeigniter - by El Forum - 07-06-2009, 12:39 PM
PDO in Codeigniter - by El Forum - 07-06-2009, 12:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB