Código PHP:
<?php
$dbh = EstablecerConexion();
$CodBanner="";
$Banner="";
$SQL = "SELECT banner.CodBanner,ImgBanner,URL FROM banner Where TipBanner = 13 and (CodSeccin =31 )"; $SQL .= " and FechaPublic <= NOW() and FechaVencim >= NOW()";
$SQL .= " order by banner.CodBanner ASC";
$Datos = mysql_query($SQL);
if ($Datos) {
$num=mysql_num_rows($Datos);
$i=0;
$Ancho=990;
$alto=90;
$DesBanner1="";
while ($i < $num) {
include("banner3.php");
++$i;
} //do while
}//if Datos
echo $DesBanner1; mysql_close(); ?>