CREATE TABLE traslados(
id_web int( 4 )auto_increment ,
web text,
ciudad text,
provincia text,
pais text,
traslados text,
auto text,
KEY ( id_web )
)
;
y la muestro asi:
Código PHP:
<?php include("cone.php"); ?>
<?php
$sql=mysql_query("select * from traslados WHERE web>='at_salta' order by auto Desc");
echo '<table width="580" border="0"bgcolor="#993366" cellpadding="0" cellspacing="0" >'; echo '
<tr height="25" >
<td width="500">
<div align="left"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF">Traslados</font></strong></div></td>
<td width="80">
<div align="center"><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF">Auto 1-3 pax</font></strong></td>
</tr>'; // Así escribimos la cabecera de la tabla
while ($row = mysql_fetch_array($sql)) {
if ($colorfila==0){
$color= "#F4EACA";
$colorfila=1;
}else{
$color="#FFFFE6";
$colorfila=0;
}
echo '<tr bgcolor='.$color.'>'.'<td width="500" height="20" height="4">'.'<strong>'.$row['traslados'].'</strong>'.'</td>'.'<td height="20" align ="center" width="80">'.'<strong>'.$row['auto'].'</font>'.'</strong>'.'</td>';
}
echo '</table>'; // Fin de la tabla.
?>
Pero me muestra dos y tres veces el mismo registro