Ver Mensaje Individual
  #6 (permalink)  
Antiguo 10/06/2009, 14:05
esaenz22
(Desactivado)
 
Fecha de Ingreso: abril-2008
Mensajes: 787
Antigüedad: 16 años, 1 mes
Puntos: 7
Respuesta: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL resul

hola Fabj21. prueba con esto.

Código PHP:
    $carrera "Ingeniería Industrial";
    
conectarse();
    
$sql "SELECT jefe,departamento FROM estudiosprofesionales WHERE carrera = $carrera";
    
$res mysql_query($sql) or die(mysql_error());
    
$row mysql_fetch_array($res); #puedes tambien colocar mysql_fetch_assoc() o mysql_fetch_array();    
    
$jefe $row['jefe'];
    
$departamento $row['departamento'];
    
    echo 
"<strong>Depto : </strong>$departamento<br><strong>Jefe : </strong>$jefe<br>"
saludos.

Última edición por esaenz22; 10/06/2009 a las 14:06 Razón: correcion del texto.