- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
class I_Mysql
{
var
$host="localhost",
$user="root",
$password="",
$database="gorodokbox",
$charset="utf8",
$connected=false,
$db_selected=true,
$r_connection=null,
$result=null,
$row=array(),
$field=null,
$debug=false;
function I_Mysql()
{
}
function connect($host="localhost", $user="roo", $password="", $type=0)
{
$this->host=$host;
$this->user=$user;
$this->password=$password;
$this->database=$password;
if(defined('MYSQLDEBUG'))$this->debug=1;
@$this->r_connection = mysql_connect($this->host, $this->user, $this->password);
@$er=mysql_errno($this->r_connection);
if(!$er)
{
if($this->debug) echo "mySQL connected<br>";
$GLOBALS['CVARS']['DB']['connected']=true;
$GLOBALS['CVARS']['DB']['rcon']=$this->r_connection;
$this->connected = true;
$GLOBALS['CVARS']['DB']['mysql']=&$this;
return true;
}
return false;
}
..................................................
paranoid 04.09.2009 10:30 # −1
а потом что нить вроде ..->connect($conf->db);
mac1nt0sh 04.09.2009 18:44 # 0