This is my code:

//connect to mysql
//change user and password to your mySQL name and password
//select which database you want to edit

//select the table
$result = mysql_query("select * from epair LIMIT 20;");

//grab all the content
   //the format is $variable = $r["nameofmysqlcolumn"];
   //modify these to match your mysql table columns
echo "<tr><td><b>$programme</b></td><td>showing on $channel</td><td>$airdate</td><td>$episode</td><td>$setreminder</td></tr>";

However, for episode I am considering putting it into a separate table, how would I do a query from multiple tables?
My site is similar to this one in content:!-12578

I've got my database to generate 20 records per page but cannot get it to get the next set of 20 records onto another page, and so on, if there's more records, with it dynamically creating the page menus at the footer of the page like in the above link (I'm not sure how to do this!). Also, I cannot get the time and date to display properly - in my database it always ends up displaying the current date and time as a UNIX timestamp.

I'm trying to get it so that the time and date display as for $time variable:

December 15th - 6:00pm



Also, is there a way to get the record deleted after a period of time (e.g. 30 minutes/60 minutes, and also replace the field for the programme's air time so that on the day itself it just shows the airtime as in the second example above. Viewing the site links will show you what I mean.)

Also, the above site automatically deletes records after the programme has aired (which is what I am trying to do).
I'm also trying to get my data for the episode guides to be like this
(extracted from a database):
and get it to retrieve airdates/airtimes from a table, with it showing a message like this if the episode doesn't air:

Unfortunately the episode "$epname" isn't on the air any time soon.

I'm using Apache, with Phpmyadmin to create this database.

I have been trying to learn this for myself, but would appreciate any help that anyone can offer on making such a site.

My current table layout:


All help will be appreciated, and when the site is ready, I will link to it here (it's currently being developed on localhost)

I have tried php pagination, it only partially worked, giving me this message:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\www\vhosts\tvsite\tvguide1.php on line 13

However, I'm not fully sure how to paginate this properly so that the code always displays the current page as highlighted, like this link:!-12578

The variables are set in the first post on this thread.

I'm new to this PHP pagination so any advice on making this work will be very much appreciated - I have to get the site up by Boxing Day for the person I'm creating the site for!

Apologies for bringing this thread back up... any more advice ?