Ver Mensaje Individual
  #7 (permalink)  
Antiguo 06/06/2009, 13:58
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años, 9 meses
Puntos: 2135
Respuesta: Llamar métodos

A la hora de usar el or die() en el return context es incorrecto, lo mejor es que compruebes antes de regresar el recurso (en dado caso):
Código php:
Ver original
  1. public function obtenerConexion(){
  2.        $this->conexion = mysql_connect($this->servidor, $this->usuario, $this->contrasenia);
  3.        if (!$this->conexion) {
  4.               throw new Exception("Error al conectar: " . mysql_error());
  5.        }
  6.  
  7.        return $this->conexion;
  8. }

Saludos.