<?php
$query="SELECT credito,fecha_ap,estado_cre.nombre,entidad FROM cotcre03
inner join estado_cre on estado_cre.codigo=cotcre03.estado_cre
where cedula_cli = '$aux' ";
$result = mysql_query($query) or die("Query failed Cre1");
print "<TABLE WIDTH=100% BORDER=1 CELLPADDING=4 CELLSPACING=4>\n";
print '<tr><td bgcolor="#E4E4E4"><b><small>Crédito</small></b></td><td bgcolor="#E4E4E4"><b><small>Fecha Desembolso</small></b></td><td bgcolor="#E4E4E4"><b><small>Estado</small></b></td><td bgcolor="#E4E4E4"><b><small>Entidad</small></b></td> </tr>';
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr>\n";
printf("\t\t<td><small><a href=/consulta/ropa.php?acredito=%s>%s</a></small></td>\n",$line["credito"],$line["credito"]);
printf("\t\t<td align=right><small>%s</small></td>\n",$line["fecha_ap"]);
printf("\t\t<td><small>%s</small></td>\n",$line["nombre"]);
printf("\t\t<td><small>%s</small></td>\n",$line["entidad"]);
print "\t</tr>\n";
}
print "</table>\n";
/* Free resultset */
}
mysql_free_result($result);
/* Closing connection */
mysql_close($link);
} else{//
?>
la otra consulta es la siguiente:
$link = mysql_connect("localhost", "intranet", "123456")
or die("Could not connect");
//print "Connected successfully";
mysql_select_db("CARTON") or die("Could not select database");
/* Performing SQL query */
$aux=$_GET['acredito'];
$query="SELECT referen.codigo,referen.nombre FROM detmov
inner join referen on referen.codigo=detmov.codigo
where detmov.num_cre= '$aux' ";
$result = mysql_query($query) or die("Query failed Mercancias");
$line = mysql_fetch_array($result, MYSQL_ASSOC);
Gracias por anticipado si me pueden colaborar.
Luis Alfonso Cabezas Useche

Ibague-Tolima
Colombia