Can an UPDATE be made to two tables at the same time? I'm doing this but obviously it does not work:
<?php
$id = $_POST['eIdp'];
$producto = $_POST['eidPr'];
$factura = $_POST['eNumero'];
$eFecha = $_POST['eFecha'];
$eVencimiento = $_POST['eVencimiento'];
$estado = $_POST['select2-1'];
$tipo = $_POST['select2-4'];
$total = $_POST['eTotal'];
$referencia = $_POST['select2-3'];
//die()
$results = "Update pedidos Set Numero='$factura', Fecha='$eFecha', Vencimiento='$eVencimiento', Estado='$estado', Producto='$producto', Tipo='$tipo', Total='$total', Referencia='$referencia' where id= " .$_POST['eIdp'];
"Update referencias Set estadoMaquina='$tipo' where referencia= $referencia ";
if ( !mysqli_query($mysqli, $results)) {
die( 'Error: ' . mysqli_error() );
}
mysqli_close($mysqli);
?>
I also have to know if you can do a where with a field like this:
where DI001 = DI001