Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/09/2006, 08:51
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 20 años, 6 meses
Puntos: 2135
Pruebalo asi:
Código PHP:
// constructor
        
function MySQL() {
            
$this->user = 'root';
            
$this->password = 'root';
            
$this->dbSelected = 'proyecto_ds1';
            
$this->server = 'localhost';
        }
        
        
// conectar con el server
        
function conectar() {
            
$this->link = mysql_connect($this->server, $this->user, $this->password);
            if (!
$this->link) {
                print 
"Error en la conexion:" . mysql_error();
                return 
false;
            }
            if (!(
mysql_select_db($this->dbSelected, $this->link))) {
                print 
"Error al seleccionar base de datos: "  . mysql_error();
                return 
false;
            }
        }