Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/08/2005, 15:59
Arturo Rubio
 
Fecha de Ingreso: diciembre-2004
Mensajes: 13
Antigüedad: 19 años, 4 meses
Puntos: 0
Pregunta Recorro una tabla con while de php que se selecciona con SELECT ,y me muestra interc

Amogos tengo el sgte problema:
1 hago un select a una tabla de ventas
luego recorro la tabla con un while y la muestro y siempre me muestra intercalados los registro no se porque? la consulta la he efectuado directamente em mysql y me genera bien los datos.
si alguen me puede ayudar se lo agradezco desde ya.

AQUI VA EL CODIGO

$result_vent=mysql_query("select * from ventas where
codtray_vent='$trayecto_con' and
fectray_vent='$fecha' and
horaini_vent='$hora_tray_con' and
ciudori_vent='$origen_via' and
ciuddes_vent='$destino_via' and
estado_vent='R'
order by numasi_vent");
$cant_pas=0;
while ($row=mysql_fetch_array($result_vent))
{
echo "<tr>";
$cant_pas++;
$ln_numasi=$row['numasi_vent'];
$ln_tarifa=$row['tarifa_vent'];
$ln_tipodes=$row['tipodes_vent'];
$ln_tarifa=$_POST['txtarifa_con'];
$ln_descuen=$row['descuen_vent'];
$ln_valorpas=$row['valorpas_vent'];
$ln_subida=$row['subida_vent'];

echo "<td width='10%' height='10' bgcolor='#99ff66' >$ln_numasi</td>";
echo "<td width='10%' height='10' bgcolor='#99ff66' >$ln_tarifa</td>";
echo "<td width='10%' height='10' bgcolor='#99ff66'>";
$ciudori=$_POST['txorigen_con'];
$ciuddes=$_POST['txdestino_con'];
$ssql="SELECT tipodes_des,valor_des FROM descuentos
WHERE ciudori_des='$ciudori'
AND ciuddes_des='$ciuddes'";
$nombre='txtipodes';
$valor=99;
$valordes=0;
saca_menu_tipodescuentos($ssql,$valor,$nombre);
echo "</td>";
echo "<td width='5%' height='10' bgcolor='#99ff66'>$valdes</td>";
$valpas=$ln_tarifa-$valdes;
echo "<td width='5%' height='10' bgcolor='#99ff66'>$valpas</td>";
echo "<td width='60%' height='10' bgcolor='#99ff66'>";
echo "<input type='txt' name='txsubida' value=$ln_subida>";
echo "</td>";
echo "<td><a href=\"ejemplo.phtml?codigo_age=%d\>Borra</a></td>";
echo "<td>$cant_pas</td>";
}
}
?>