Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/12/2010, 11:54
juanmh
 
Fecha de Ingreso: septiembre-2010
Mensajes: 10
Antigüedad: 13 años, 8 meses
Puntos: 0
Exclamación Inmovilizar pananeles en php

hola amigos del foro me podrian ayudar, tengo un problema estoy intentando inmovilizar panales como en excel en php ya, les paso el codigo que estoy utilizando,

$consulta = "SELECT Part_0.PartNum, Part_0.PartDescription, Part_0.ProdCode, Forecast_0.PartNum, SUM(Forecast_0.ForeQty) AS ForeQty
FROM MFGSYS.PUB.Forecast Forecast_0, MFGSYS.PUB.Part Part_0
WHERE Forecast_0.PartNum = Part_0.PartNum
AND Forecast_0.Company = Part_0.Company AND ((Forecast_0.ForeDate BETWEEN '".$anoinicial."-".$mesini."-".$diaini."' AND '".$anofinal."-".$mesfin."-".$diafin."')) AND ProdCode NOT IN ('', 'AAPLIQUE', 'AFLUORES','AINDUST','AJARDIN','APROYEC','APUBVIAL ','APURBANO','ASUMERG','CONNECT')
GROUP BY Part_0.PartNum, Part_0.PartDescription, Part_0.ProdCode, Forecast_0.PartNum
order by ProdCode Asc";
$result = odbc_exec($db,$consulta);
if (!$result) {
exit("Error en la consulta");
} else {


print" <style type='text/css'>
<!--
.Estilo3 {
font-size: 12px;
font-weight: bold;
color: #000000;
font-family: Arial;
}
.Estilo4 {font-size: 10px}
.Estilo5 {font-size: 10px; font-weight: bold; color: #000000; font-family: Arial; }
body,td,th {
color: #FFF;
}
-->
</style>
<table height='165' border=1 align=center bgcolor=scrollbar>
<td width='1000' height='400'>

<table id='encabezado' border=1 cellspacing=0 cellpadding=2 bgcolor=#cccccc>
<tr>


</tr>
<tr>
<td width='85' height='17' bgcolor='#003366'><div align='center' class='Estilo4'>Numero de parte</div></td>
<td width='107' bgcolor='#003366'><div align='center' class='Estilo4'>Descripci&oacute;n</div></td>
<td width='40' bgcolor='#003366'><div align='center' class='Estilo4'>Linea</div></td>
<td width='80' bgcolor='#003366'><div align='center' class='Estilo4'>Serie</div></td>
<td width='80' bgcolor='#003366'><div align='center' class='Estilo4'>Familia</div></td>

</tr>
</table>
<div style='overflow:auto; height:400px; padding:0'>
";


while ($valor = odbc_fetch_array($result)) {
$PartNum = $valor['PartNum'];
$PartDescription = $valor['PartDescription'];

print "
<table border=1 cellspacing=0 cellpadding=2 id='datos' bgcolor=white>
<tr>
<td width='85' height='21' bgcolor='#66CC99'><div align='center' class='Estilo5'>$PartNum </div></td>
<td width='107' bordercolor='#FFFFFF' bgcolor='#66CC99'><div align='center' class='Estilo3 Estilo4'>$PartDescription</div>
<td width='40' bordercolor='#FFFFFF' bgcolor='#66CC99'><div align='center' class='Estilo3 Estilo4'></div>
<td width='80' bordercolor='#FFFFFF' bgcolor='#66CC99'><div align='center' class='Estilo3 Estilo4'></div>
<td width='80' bordercolor='#FFFFFF' bgcolor='#66CC99'><div align='center' class='Estilo3 Estilo4'></div></td>
</tr>
</table>

</div>

</td>
</table>

lo que pasa que cuando cunsulto la tabla nada mas me inprime una solo vez dentro del <div style='overflow:auto; height:400px; padding:0'>

y los demas me los esta poniendo fuera del div me podrian ayudar amigos se los agradecere.