06-09-2008, 04:22 PM
|
#3 (permalink)
|
|
The Contributor
Join Date: May 2008
Location: Denmark
Posts: 70
Thanks: 3
|
I changed the code to this:
PHP Code:
public function connect() { static $host = 'localhost'; static $user = 'SpYkE112'; static $pass = ''; static $name = array(0 => 'dev1', 1 => 'pureftpd'); for($i = 0; $i < sizeof($name); $i++) { if ($this->link[$name[$i]] = mysql_connect($host,$user,$pass, true)) { if (!mysql_select_db($name[$i],$this->link[$name[$i]])) { $p101->error['undbs'] = 'Unable to select database: ' . $name[$i]; return(false); } else { continue; } } else { $p101->error['uncdb'] = 'Unable to connect database: ' . $name[$i]; return(false); } } }
But now it just returns an empty array :/
|
|
|
|