This is the code I am trying to use, with this achievement I make the Update
to the field I want but only take into account one of the two fields I want to validate before the Update is made.
$sql = "UPDATE ingresos SET cod_factura='$fact'
WHERE control =
(SELECT control
FROM (SELECT control
FROM ingresos, certificado
WHERE control='$con' AND cod_unico=unico_cod AND cod_certifica='$cod' )
AS alias_ingresos )";