Ver Mensaje Individual
  #4 (permalink)  
Antiguo 13/04/2012, 14:07
Avatar de a_gomez
a_gomez
 
Fecha de Ingreso: marzo-2012
Ubicación: /var/www/
Mensajes: 48
Antigüedad: 12 años, 1 mes
Puntos: 2
Respuesta: problema con php y mysql

no soy un experto pero yo lo haria de la siguiente manera ...

Código PHP:
Ver original
  1. <?php
  2.  
  3. $matricula =$_REQUEST[matricula];
  4. $turno!=$_REQUEST[turno];
  5.  
  6. $rs = mysql_query("SELECT * from estudiantes WHERE matricula='$matricula' AND turno='$turno' ;");
  7.  
  8. if (mysql_num_rows($rs)>0){
  9.  
  10. $rs = mysql_query("UPDATE matricula, turno SET matricula='$matricula' AND turno='$turno' ;");
  11.  
  12. echo "registros actualizados con exito ...";
  13.  
  14. }else{ 
  15.  
  16. echo "NO SE ENCUENTRAN RESULTADOS QUE CONCUERDEN";
  17.  
  18. }
  19.  
  20. ?>