Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/06/2010, 13:29
turfeano
 
Fecha de Ingreso: diciembre-2008
Mensajes: 190
Antigüedad: 15 años, 4 meses
Puntos: 6
Respuesta: No borra datos (mysql_num_rows($resp)

Pero nunca ejectuas el borrado :S
y en el where con el dni deberia alcanzar , si el alumno es unico
Código PHP:
$resp mysql_query("select * from notas where DNI='".$_POST['DNI']."'"); 
if(
mysql_num_rows($resp) > )  
{     

$resp=mysql_query("delete from usuario where login='".$_POST['login']."' and pass='".$_POST['pass']."' and DNI='" .$_POST['DNI']."'"); 
$resp=mysql_query("delete from notas where  DNI='" .$_POST['DNI']."'") ;


echo 
"Alumno borrado"

else 

echo 
"DNI incorrecto"



mysql_close($conexion);