
10-19-07, 06:35 AM
|
|
Newbie Coder
|
|
Join Date: Dec 2006
Location: Pakistan
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
helo
here is he code
my website url is http://www.zabga.org.pk
PHP Code:
/* establish connection, select database */
if (!$this->Connected) {
$this->Query_ID = 0;
if($this->Persistent)
$this->Link_ID=mysql_pconnect($DBHost, $DBUser, $DBPassword);
else
$this->Link_ID=mysql_connect($DBHost, $DBUser, $DBPassword); (Line no 99)
if (!$this->Link_ID) {
$this->halt("cannot connect to Database " . mysql_error());
return 0;
}
if (!@mysql_select_db($DBDatabase,$this->Link_ID)) {
$this->halt("cannot use database " . mysql_error());
return 0;
}
$server_info = @mysql_get_server_info($this->Link_ID);
preg_match("/\d+\.\d+(\.\d+)?/", $server_info, $matches);
$version_str = $matches[0];
$version = explode(".", $version_str);
if ($version[0] >= 4) {
if ($version[1] >= 1 && is_array($this->Encoding) && $this->Encoding[1])
@mysql_query("set character set '" . $this->Encoding[1] . "'", $this->Link_ID);
elseif (is_array($this->Encoding) && $this->Encoding[0])
@mysql_query("set character set '" . $this->Encoding[0] . "'", $this->Link_ID);
}
$this->Connected = true;
}
return $this->Link_ID;
}
please if any body now about this tell me
Last edited by mab; 10-19-07 at 07:03 AM.
Reason: Code tags when posting code please.
|