View Single Post
Old 06-09-2008, 04:22 PM   #3 (permalink)
SpYkE112
The Contributor
 
Join Date: May 2008
Location: Denmark
Posts: 70
Thanks: 3
SpYkE112 is on a distinguished road
Default

I changed the code to this:
PHP Code:
    public function connect()
    {
        static 
$host 'localhost';
        static 
$user 'SpYkE112';
        static 
$pass '';
        static 
$name = array(=> 'dev1'=> 'pureftpd');
        
        for(
$i 0$i sizeof($name); $i++)
        {
            if (
$this->link[$name[$i]] = mysql_connect($host,$user,$passtrue))
            {
                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 :/
SpYkE112 is offline  
Reply With Quote