Ver Mensaje Individual
  #15 (permalink)  
Antiguo 04/11/2011, 15:11
Avatar de Briss
Briss
 
Fecha de Ingreso: junio-2011
Mensajes: 1.293
Antigüedad: 12 años, 10 meses
Puntos: 12
Respuesta: no visualizo una imagen como resultado de un select

lo tengo asi ahora
Código PHP:
<? 
mysql_select_db
($database_connection$connection); 
  
$contar =sprintf"SELECT COUNT(rfcalumno) FROM avisos_alumnos WHERE estado='0' and rfcalumno='%s' "$_SESSION['mivariabledesesion']); 
  
$cuenta =sprintf"SELECT count(*) FROM avisos_gruposm, alumnosm where avisos_gruposm.maestria=alumnosm.maestria and avisos_gruposm.idgrado=alumnosm.idgrado and rfcalumno='%s'"$_SESSION['mivariabledesesion']); 
  
$res mysql_query($contar) or die(mysql_error()); 
$res2 mysql_query($cuenta) or die(mysql_error()); 

if (
$num mysql_fetch_row($res) and $num2 mysql_fetch_row($res2) ) { 
    if (
$num[0] == 0  and $num2[0] == ) { 
        echo 
'<img src="no.png"/>'
    } else if (
$num[0] != 0  ) { 
        echo 
'<img src="individual.png" width="136" height="105" border="0" id="PanelAlumno_r3_c6" alt="" />'
    } 
    else if (
$num2[0] != 0  ) { 
        echo 
'<img src="grupo.png" width="136" height="105" border="0" id="PanelAlumno_r3_c6" alt="" />'
    } 
if(
$num[0] != 0  and $num2[0] != 0) { 
        echo 
'<img src="ambos.png" width="136" height="105" border="0" id="PanelAlumno_r3_c6" alt="" />'
    } 

?>
Solo que aun me confundo en el if ... el ultimo me muestra las dos imagenes invidual y ambos...