Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/09/2013, 08:44
Bugger
 
Fecha de Ingreso: septiembre-2010
Ubicación: /home/
Mensajes: 103
Antigüedad: 13 años, 8 meses
Puntos: 17
Respuesta: inserta pero arroja error

Hola zeuzft

explicación stdClass
Código PHP:
public function Registro() 
    {                 
        try 
        { 
            
$miconexion=new DB_mysql 
            
$miconexion->conectar(); 
            
$select = array($this->campos_sinid); 
            
$from = array($this->tabla); 
 
            
$Clase= new stdClass//  tienes que declarar el objeto

            
$Clase->clave=$_POST['password']; //linea 104 
            
$Clase->nombre=$_POST['nombre']; 
            
$Clase->apellidos=$_POST['apellidos']; 
            
$Clase->dni=$_POST['dni']; 
            
$Clase->telefono=$_POST['telefono']; 
            
$Clase->tipo=$_POST['tipo']; 
            
$Clase->email=$_POST['email']; 
            
/*usu_id,usu_nom,usu_ape,usu_dni,usu_email,usu_clave,usu_tel,usu_tipo,usu_pas*/ 
            
$valores = array("'".$this->nombre."'","'".$this->apellidos."'","'".$this->dni."'","'".$this->email."'","'".$this->clave."'","'".$this->telefono."'","'".$this->tipo."'","'0'"); 
            
$sql3parent::construir_inserta($select$from$valores); 
             
            
$consulta $miconexion->consulta($sql3); 
             
        } 
        catch(
Exception $error
        { 
            throw new 
Exception("Error al registrar al ".$this->msje." ".$this->nombre."<br>"$error->getMessage()); 
            exit(); 
        } 
    } 
saludos