Foros del Web » Programando para Internet » PHP »

Tengo problemas con el siguiente codigo

Estas en el tema de Tengo problemas con el siguiente codigo en el foro de PHP en Foros del Web. Buenas tardes tengo el siguiente codigo de mi pagina web que me muestra los anuncios clasificados pero en orden desendente, yo quiero que los muestre ...
  #1 (permalink)  
Antiguo 15/09/2011, 17:12
Avatar de compuson  
Fecha de Ingreso: septiembre-2011
Mensajes: 3
Antigüedad: 12 años, 7 meses
Puntos: 0
Tengo problemas con el siguiente codigo

Buenas tardes tengo el siguiente codigo de mi pagina web que me muestra los anuncios clasificados pero en orden desendente, yo quiero que los muestre horizontalmete pero no encuentro que cambiarle para que me los muestre como quiero, si alguien del foro me pudiera ayudar... gracias el codigo es:

<div style="position:justify; top:0px; left:110%; margin-left:-10px; width:700px; height:20px; font-size:14px; color:blue; font-weight: bold;font-family:Elegance, Arial, Helvetica, sans-serif;"><marquee direction="LEFT" width="60%" scrollamount="4">
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" class="postlisting" width="100%">

<!-- End Version 5.0 -->

<?php
$sql = "SELECT a.*, ct.cityname, UNIX_TIMESTAMP(a.createdon) AS timestamp, feat.adid AS isfeat, COUNT(*) AS piccount, p.picfile AS picfile, scat.subcatname, scat.catid, cat.catname
FROM $t_ads a
INNER JOIN $t_featured feat ON a.adid = feat.adid AND feat.adtype = 'A' AND feat.featuredtill >= NOW()
INNER JOIN $t_cities ct ON a.cityid = ct.cityid
INNER JOIN $t_subcats scat ON a.subcatid = scat.subcatid
INNER JOIN $t_cats cat ON scat.catid = cat.catid
LEFT OUTER JOIN $t_adpics p ON a.adid = p.adid AND p.isevent = '0'
WHERE $visibility_condn
$loc_condn
GROUP BY a.adid
ORDER BY a.createdon DESC
LIMIT $latest_featured_ads_count";
$res_latest = mysql_query($sql) or die($sql.mysql_error());

$css_first = "_first";
while($row = mysql_fetch_array($res_latest))
{
/* Begin Version 5.0 */
$url = buildURL("showad", array($xcityid, $row['catid'], $row['catname'], $row['subcatid'], $row['subcatname'], $row['adid'], $row['adtitle']));
/* End Version 5.0 */

?>

<?php
/*if($row['isfeat'])
{
//$feat_class = "class=\"featured\"";
$feat_img = "<img src=\"images/featured.gif\" align=\"absmiddle\">";
}
else
{
//$feat_class = "";
$feat_img = "";
}*/

if($row['picfile'])
{
$picfile = $row['picfile'];
$imgsize = GetThumbnailSize("{$datadir[adpics]}/{$picfile}", $tinythumb_max_width, $tinythumb_max_height);
}
else
{
$picfile = "";
}
?>

<tr>
<td align="center" width="<?php echo $tinythumb_max_width; ?>">
<?php if($picfile) { ?>
<a href="<?php echo $url; ?>"><img src="<?php echo "{$datadir[adpics]}/{$picfile}"; ?>" border="0" width="<?php echo $imgsize[0]; ?>" height="<?php echo $imgsize[1]; ?>" style="border:0px solid black"></a>
<?php } ?>
</td></tr>


<tr class="c2">
<td>
<b><a href="<?php echo $url; ?>" <?php echo $feat_class; ?>><?php echo $row['adtitle']; ?></a></b>
<?php if(0&&$row['picfile']) { ?><img src="images/adwithpic.gif" align="absmiddle"><?php } ?></p>


<span class="adcat">



<?php echo "$row[catname] $path_sep $row[subcatname]"; ?>



<?php
$loc = "";
if($row['area']) $loc = $row['area'];
if($xcityid < 0) $loc .= ($loc ? ", " : "") . $row['cityname'];
if($loc) echo "<br>$loc";
?>

</span>



</td>



</tr>

<?php
$css_first = "";
}
?>

</table>
</div>


</marquee></div>

Etiquetas: mysql, siguiente, sql
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:52.