Beispiel #1
0
function openDataBase($server, $database, $user, $pw)
{
    global $odb;
    $odb = mysql_connect($server, $user, $pw);
    if ($odb == null) {
        return false;
    }
    mysql_select_db($database);
    InitializeObjects();
    return $odb;
}
Beispiel #2
0
function openDataBase($server, $database, $user, $pw)
{
    global $odb;
    #$odb = mysql_connect($server, $user, $pw);
    $odb = mysql_connect($server, $user, $pw);
    if ($odb == null) {
        return false;
    }
    mysql_select_db($database);
    InitializeObjects();
    $database_charset = "utf8";
    mysql_query("SET CHARACTER SET '{$database_charset}'", $odb);
    return $odb;
}