Tema: oferta.php
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/02/2010, 15:33
ZEVA
 
Fecha de Ingreso: febrero-2010
Mensajes: 19
Antigüedad: 14 años, 2 meses
Puntos: 0
oferta.php

Los querys que utilicÉ para esa pantalla son:


Código MySQL:
Ver original
  1. $sql=("select * from alumnos");
  2. $result = mysql_query($sql) or die(mysql_error());
  3.  
  4. $row = mysql_fetch_array( $result );
  5.  
  6. $sqlm = "select * from `materias`";
  7. $result = mysql_query($sqlm) or die(mysql_error());
  8.  
  9. $sqlc = "select * from `materias`, `notas_materia
  10. where `codigo_materia` >0 and `unidades_credito` >=0"
  11.  
  12. $result = mysql_query($sqlc) or die(mysql_error());

y los imprimÍ en php con:


Código PHP:
<? While($row=mysql_fetch_array($result)){ ?>
<td> <? Echo $row["codigo_materia"];?> </td>
<td> <? Echo $row["materias"]; ?> </td>
<td> <? Echo $row["unidades_credito"]; ?> </td>
<td> a - b - c - d - e </td>
</tr>
</tbody>
<? }?>
no sÉ si necesito un join u otro select para notas <4, ni tengo idea alguna de como hacerlo...
:(