git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@61 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
David Goodwin 17 years ago
parent 86c40569ab
commit e7436140e3

@ -1198,6 +1198,7 @@ function db_connect ()
if (function_exists ("mysql_connect"))
{
$link = @mysql_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or die ("<p />DEBUG INFORMATION:<br />Connect: " . mysql_error () . "$DEBUG_TEXT");
@mysql_query("SET CHARACTER SET utf8",$link);
$succes = @mysql_select_db ($CONF['database_name'], $link) or die ("<p />DEBUG INFORMATION:<br />MySQL Select Database: " . mysql_error () . "$DEBUG_TEXT");
}
else
@ -1212,6 +1213,7 @@ function db_connect ()
if (function_exists ("mysqli_connect"))
{
$link = @mysqli_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or die ("<p />DEBUG INFORMATION:<br />Connect: " . mysqli_connect_error () . "$DEBUG_TEXT");
@mysqli_query($link,"SET CHARACTER SET utf8");
$succes = @mysqli_select_db ($link, $CONF['database_name']) or die ("<p />DEBUG INFORMATION:<br />MySQLi Select Database: " . mysqli_error () . "$DEBUG_TEXT");
}
else
@ -1227,6 +1229,7 @@ function db_connect ()
{
$connect_string = "host=" . $CONF['database_host'] . " dbname=" . $CONF['database_name'] . " user=" . $CONF['database_user'] . " password=" . $CONF['database_password'];
$link = @pg_pconnect ($connect_string) or die ("<p />DEBUG INFORMATION:<br />Connect: " . pg_last_error () . "$DEBUG_TEXT");
pg_set_client_encoding($link, UNICODE);
}
else
{

Loading…
Cancel
Save