Welcome Guest, Not a member yet? Register   Sign In
appending MySQL client flags to connections
#1

[eluser]sjmiller85[/eluser]
I'm looking to append a forth parameter to the mysql connection for client flags (specifically MYSQL_CLIENT_CONNECT). I'm having a bugger of a time trying to find where the actual connection is being made in the DB_Driver file, does anyone know where the db connection is made, or if CI has built-in functionality for accepting client flags in the connections?
#2

[eluser]pistolPete[/eluser]
Code:
function db_connect()
{
        if ($this->port != '')
        {
            $this->hostname .= ':'.$this->port;
        }
        
        return @mysql_connect($this->hostname, $this->username, $this->password, TRUE);
}

Location: ./system/database/drivers/mysql/mysql_driver.php

In order to change that method to accept the flags you have to extend the mysql driver.
Have a look at the wiki: http://codeigniter.com/wiki/Extending_Database_Drivers/
#3

[eluser]sjmiller85[/eluser]
Awesome, thank you for the help!




Theme © iAndrew 2016 - Forum software by © MyBB