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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.