Ver Mensaje Individual
  #4 (permalink)  
Antiguo 28/08/2012, 09:31
matteomatico
 
Fecha de Ingreso: febrero-2008
Mensajes: 22
Antigüedad: 16 años, 2 meses
Puntos: 0
Respuesta: llamar una funcion dentro de otra php mysql

CLASE...

Código PHP:

class Ingresos
{
//--------------------------------------------ATRIBUTOS 
    //atributo clase 
    
//--------------------------------------------CONTRUCTOR------------------------
    
public function __construct()
    {
    
//$this->car= new Ingresos;    
            
    
}

public function 
add_interno($cf,$nombres,$apellidop,$apellidom,$contrasena,$grado)
        {
        
    
$sql="insert into interno (INT_ID, INT_NOMBRES,INT_APELLIDOP,INT_APELLIDOM,INT_PASS,INT_GRADO)  values('$cf','$nombres','$apellidop','$apellidom','$contrasena','$grado')";
        
        
$res=mysql_query($sql,Conectar::Con());    
        echo 
"<script type='text/javascript'>
        alert('Interno Ingresado Correctamente');
        document.location.href = 'index.php';
        </script>"
;
                    
        }

public function 
modificacion_cargo($old$nuevo$id)
     {
         
        
//si esta vacio EDITARÁ
        
if (($new == null) and ($old == null))
            {
            
        
$this->edit_cargos($nuevo$antiguo$id);
            
            }
        
//SI  NO ESTA VACIO PERO PISTOLA ANTIGUA SI. HAY QUE AGREGAR EL REGISTRO    
        
else if( ($new != null) and ($old == null))
            {
            
$this->add_nuevo_cargo($nuevo$id);
            
            }
        
//SI  ESTA VACIO PERO PISTOLA ANTIGUA NO. HAY QUE ELIMINAR    
        
if( ($new == null) and ($old != null))
            {
            
$this>eliminar_cargo($antiguo$id);
            
            }