Jump to content

Next/Previous PHP/SQL Table?


Zangakat

Recommended Posts

Hey, I've recently started webdesign, and sort of need help with a SQL table code that uses previous/next buttons.

 

The code im using to view the first "page" of the table looks like this.

 

<?php

 

$animerelease=mysql_query("SELECT a.Title, a.Releases, a.RGroup, a.Download

FROM  anime_release as a, anime_release as b

WHERE (a.Dates>b.Dates)and(a.Title=b.Title)

GROUP  by a.Title ORDER by a.Dates DESC");

 

while($row = mysql_fetch_array($animerelease))

{

echo('

 

<tr>

 

<td>'.$row["Title"].'</td>

<td>'.$row["Releases"].'</td>

<td>'.$row["RGroup"].'</td>

<td><a href="'.$row["Download"].'"Target="_blank"> <img border="0" src="dl.png" align="center"></img></a></td>

');

 

echo('</tr>');

 

}

 

?>

 

This basically retrieves the table from sql and orders it by date, and limits it to only show one serie/show per table. What i wanna do is make the previous button retrieve the previous release of the shows being displayed, and next display the newer releases ofcourse.

 

Any help would be appreciated.

 

 

Link to comment
https://forums.phpfreaks.com/topic/93760-nextprevious-phpsql-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.