HTML interesse |
|
Dit is het connect deel:
//-----------------------------------------
// Connect
//-----------------------------------------
if ( $this->obj['persistent'] AND ! IPS_MAIN_DB_CLASS_LEGACY )
{
$this->connection_id = mysql_pconnect( $this->obj['sql_host'] ,
$this->obj['sql_user'] ,
$this->obj['sql_pass'] ,
$this->obj['force_new_connection']
);
}
else
{
if ( IPS_MAIN_DB_CLASS_LEGACY )
{
$this->connection_id = mysql_connect( $this->obj['sql_host'] ,
$this->obj['sql_user'] ,
$this->obj['sql_pass']
);
}
else
{
$this->connection_id = mysql_connect( $this->obj['sql_host'] ,
$this->obj['sql_user'] ,
$this->obj['sql_pass'] ,
$this->obj['force_new_connection']
);
}
}
if ( ! $this->connection_id )
{
$this->fatal_error();
return FALSE;
}
if ( ! mysql_select_db($this->obj['sql_database'], $this->connection_id) )
{
$this->fatal_error();
return FALSE;
}
return TRUE;
}
//----------------------------------------- // Connect //----------------------------------------- if ( $this->obj['persistent'] AND ! IPS_MAIN_DB_CLASS_LEGACY ) { $this->obj['sql_user'] , $this->obj['sql_pass'] , $this->obj['force_new_connection'] ); } else { if ( IPS_MAIN_DB_CLASS_LEGACY ) { $this->obj['sql_user'] , $this->obj['sql_pass'] ); } else { $this->obj['sql_user'] , $this->obj['sql_pass'] , $this->obj['force_new_connection'] ); } } if ( ! $this->connection_id ) { $this->fatal_error(); return FALSE; } { $this->fatal_error(); return FALSE; } return TRUE; }
|