Ver Mensaje Individual
  #11 (permalink)  
Antiguo 09/11/2012, 11:36
Avatar de andreamorante184
andreamorante184
 
Fecha de Ingreso: agosto-2012
Mensajes: 65
Antigüedad: 11 años, 8 meses
Puntos: 0
Respuesta: se puede pasar en una funcion por el metodo post

archivo galeria.php
<?php
include("conectarme.php");
$link=Conectarse();
$SqlQuery = "SELECT c, t, s, t1, (SELECT n FROM i WHERE pagina = 'G' AND i.s=t2.c AND destacada =1 ORDER BY fecha DESC LIMIT 1) AS i FROM t2";


$result = mysql_query ($SqlQuery);
while ($row=mysql_fetch_array($result))
{
if ($row["c"]=='H' )
{
$imagen = "g/g/" . $row["i"];
$php = "g.php";
}

else if($row ["c"]=='CV' )
{
$imagen = "g/gc/" . $row["i"];
$php = "gc.php";
}
else if ($row ["c"]=='ElC' )
{
$imagen = "g/gdel/" . $row["i"];
$php = "gelp.php";
}
else if ($row ["c"]=='Eco' )
{
$imagen = "g/geco/" . $row["i"];
$php = "eco.php";
}

else if ($row ["c"]=='Ta' )
{
$imagen = "g/gta/" . $row["i"];
$php = "gta.php";
}
else if ($row ["c"]=='Epu' )
{
$imagen = "g/gp/" . $row["i"];
$php = "gelpueblo.php";
}
else if ($row ["c"]=='E' )
{
$imagen = "g/ge/" .$row["i"];
$php = "ge.php";
}
else if ($row ["c"]=='LCi' )
{
$imagen = "g/gciu/" .$row["i"];
$php = "gci.php";
}
else if ($row ["c"]=='QS' )
{
$imagen = "g/gqs/" .$row["i"];
$php = "gps.php";
}
else if ($row ["c"]=='NSe' )
{
$imagen = "g/gns/" .$row["i"];
$php = "gns.php";
}
else if ($row ["c"]=='Act' )
{
$imagen = "g/gai/" .$row["i"];
$php = "gai.php";
}
else if ($row ["c"]=='AE' )
{
$imagen = "g/ge/" .$row["i"];
$php = "ga.php";
}
else if ($row ["c"]=='T' )
{
$imagen = "g/gt/" .$row["i"];
$php = "gt.php";
}

$tabla .= "<tr><td height='167' colspan='2'><div align='center'><a href='" . $php . "' target='_parent'><img src='". $imagen . "' width='160' height='141' border='0'></a></div></td></tr>";

$tabla .= "<tr><td height='37' colspan='2' class='Estilo53' valign='top'><div align='center'><a href='" . $php . "' title='Galeria " . $row["titulo"] . "' target='_parent' style='text-decoration:none; color: #000000;'>Album / " . $row["subtitulo"] . "</a> </div></td></tr>";

}
echo($tabla);

?>

Hasta aquí me imprime todos las galerías que yo quiero no hay ningún problema.
Lo malo es que yo quiero que con un include en otras páginas solo me imprima tres registros de esta página... pero si le doy LIMIT 3 siempre me va a imprimir las tres primeras yo quiero que me imprima en otras páginas 3 registros diferentes.
Gracias
__________________
Andrea Morante