Bonjour,
J'ai un petit probleme avec ce script compte tenu que l'indexation avec LIMIT ne fonctionne pas dans ce cas,
je voudrais quand même avoir la possibilité de faire suivant et précedant et je n'y arrive pas.
$locat = $_POST['photo'] ;
$nbr=9;
$query="SELECT * FROM photos WHERE album='$locat' LIMIT $nbr";
$resultat=mysql_query($query) or die("erreur : ".mysql_error());
if($result=mysql_fetch_object($resultat)){
echo "<table width='100%' align='center' cellspacing='11' >";
$x=0;
$y=0;
$colones=3;
if ($resultat=mysql_query($query))
{
while($ligne=mysql_fetch_array($resultat))
{
$image=1;
${$locat}[]['titre']=$ligne['titre'];
$retour= $ligne['titre'];
$tmp='ti_'.$ligne['titre'];
$y++;
$x++;
if($x==1)
echo("<tr align='left'>\n");
echo ("<td width=140 height=104 align='center' valign='bottom' ><b><font size='1' >
<table background='IMAGES/pix.gif' width='131'><tr>
<td align='center' background='IMAGES/f_cadre.jpg'><font size='1'>
<b>$retournom</b></td></tr></table><br>
<img src='' name='$tmp' align='middle'>$name</td>");
if($x==$colones || $y==$nb_img) {
echo("</tr>\n");
$x=0;
}
}
Chris