


<?php
header('Cache-Control: no-cache');
header('Pragma: no-cache'); 


include('../conexion.php');

?>

<script>

function pon_prefijo(filas) {
	parent.document.formulario_lineas.filas.value=filas;
    
}



</script>

<?php


$codorden=$_GET["numordtmp"];
$numlinea=$_GET["numlinea"];


$consulta = "DELETE FROM orden_compra_lineas_tmp WHERE codorden ='".$codorden."' AND numlinea='".$numlinea."'";
	$mysqli->query($consulta);

echo "<script>parent.location.href='frame_lineas.php?numordtmp=".$codorden."';</script>";

$query_busqueda="SELECT count(*) as filas FROM orden_compra_lineas_tmp WHERE  codorden=$numordtmp" ;
if ($result = $mysqli->query($query_busqueda)) {
$filas = $result->num_rows;
$result->close();
}



?>


				<script languaje="javascript">
	pon_prefijo("<?php echo $filas ?>");
	
		</script>