$sqld = "SELECT * FROM proyectos, proy_clase, proy_tipo WHERE proyectos.p_id=proy_clase.cp_proy AND proy_tipo.tp_id=proy_clase.cp_tp AND proyectos.p_act='1' AND proy_tipo.tp_alias='$talias' ORDER BY p_orden";
$red = $mysqli->query($sqld);
while ($pd = $red -> fetch_assoc()){
$p_id = $pd['p_id'];
$pvpd = number_format($pd[p_pvpd], 2, ',', '.');
$pvpn = number_format($pd[p_pvp], 2, ',', '.');
?>
} ?>
$sqlm = "SELECT * FROM galeria WHERE gal_proy='$p_id' ORDER BY gal_orden limit 0,2";
$lim = $mysqli->query($sqlm);
while ($rd = $lim -> fetch_assoc()){
?>
} ?>
if ($pd['p_pvpd'] > 0){ ?>
Oferta
} ?>
if ($pd['p_destaca'] == 56){ ?>
Novedad
} ?>
if ($pd['p_pvpd'] > 0){ ?>
echo $pvpn;?>€ echo $pvpd;?>€
} else { ?>
echo $pvpn;?>€
} ?>