
26/09/2008, 15:07
|
 | | | Fecha de Ingreso: septiembre-2008
Mensajes: 182
Antigüedad: 16 años, 6 meses Puntos: 2 | |
Respuesta: Como eliminar datos de varias tablas a traves del campo clave de ellas Gracias amigos pero ya encontre la solucion se las dejo aqui por si les interesa!
<?
include("conexion.php");
$link=Conectarse();
$nhistoria=$_POST['nhistoria'];
$sql=mysql_query("delete from tabla1 where nhistoria='$nhistoria'")or die("La consulta falló: " . mysql_error());
$sql2=mysql_query("delete from tabla2 where nhistoria='$nhistoria'")or die("La consulta falló: " . mysql_error());
$sql3=mysql_query("delete from tabla3 where nhistoria='$nhistoria'")or die("La consulta falló: " . mysql_error());
$sql4=mysql_query("delete from tabla4 where nhistoria='$nhistoria'")or die("La consulta falló: " . mysql_error());
$sql5=mysql_query("delete from tabla5 where nhistoria='$nhistoria'")or die("La consulta falló: " . mysql_error());
$sql6=mysql_query("delete from tabla6 where nhistoria='$nhistoria'")or die("La consulta falló: " . mysql_error()); |