コード例 #1
0
 function __construct($dsn, $username = null, $password = null, $driver_options = array())
 {
     parent::__construct($dsn, $username, $password, $driver_options);
     echo preg_match("/host=([\\w\\.-]+);/", $dsn, $matches);
     $server = $matches[1];
     $params = array("server" => $server, "username" => $username, "password" => $password, "new_link" => false, "client_flags" => 0);
     $this->_mmb_connect = MMB::connect($params);
     return $this->_mmb_connect;
 }
コード例 #2
0
function mysql_connect($server = "localhost", $username = NULL, $password = NULL, $new_link = false, $client_flags = 0)
{
    $params = array("server" => $server, "username" => $username, "password" => $password, "new_link" => $new_link, "client_flags" => $client_flags);
    return MMB::connect($params);
}
コード例 #3
0
function mysql_connect22($server = "localhost", $username = NULL, $password = NULL, $new_link = false, $client_flags = 0)
{
    return MMB::connect($server, $username, $password, $new_link, $client_flags);
    //return \mysql_connect($server, $username, $password, $new_link, $client_flags);
}