<?php

//para obtener el tamaño de la factura
//$codigo_factura = codigo de la factura

$resulttamanofactura = mysql_query("select a.codAuthorizationControl as cod_auto, b.fldEconomicActivity as actividad_economica, b.codInvoiceSheetType as tamano_factura  
from 
txsSalesLedger a, txsAuthorizationControl b 
where 
a.pkySalesLedger = '$codigo_factura' and 
a.codAuthorizationControl = b.pkyAuthorizationControl;", $link);
while ($row = mysql_fetch_array($resulttamanofactura)) {
	$actividad_economica = $row['actividad_economica'];
	$formato_factura = $row['tamano_factura'];
}
mysql_free_result($resulttamanofactura);
	

?>