This is my code, as seen here:
http://pcafansa6.hosticks.com/episode1.php
<?php
/***********************************
* PhpMyCoder Paginator *
* Created By PhpMyCoder *
* 2010 PhpMyCoder *
* ------------------------------- *
* You may use this code as long *
* as this notice stays intact and *
* the proper credit is given to *
* the author. *
***********************************/
?>
<head>
<title> Pagination Test - Created By PhpMyCoder</title>
<style type="text/css">
#nav { font: normal 13px/14px Arial, Helvetica, sans-serif; margin: 2px 0; }
#nav a { background: #EEE; border: 1px solid #DDD; color: #000080; padding: 1px 7px; text-decoration: none; }
#nav strong { background: #000080; border: 1px solid #DDD; color: #FFF; font-weight: normal; padding: 1px 7px; }
#nav span { background: #FFF; border: 1px solid #DDD; color: #999; padding: 1px 7px; }
</style>
</head>
<?php
//Require the file that contains the required classes
include("pmcPagination.php");
//PhpMyCoder Paginator
$paginator = new pmcPagination(20, "page");
//Connect to the database
mysql_connect("localhost","root","REDACTED");
//Select DB
mysql_select_db("mytvguide");
//Select only results for today and future
$result = mysql_query("SELECT * FROM epdata WHERE airdate >= CURTIME() order by expiration ASC;");
//You can also add reuslts to paginate here
mysql_data_seek($queryresult,0) ; while($row = mysql_fetch_array($result))
{
$paginator->add(new paginationData($row['programme'],
$row['channel'],
$row['airdate'],
$row['expiration'],
$row['episode'],
$row['setreminder']));
}
?>
<?php
//Show the paginated results
$paginator->paginate ();
?><? include("pca-footer1.php"); ?>
<?php
//Show the navigation
$paginator->navigation();
?>
I can paginate, but I'm trying to get data from 2 different databases - namely mytvguide which stores info on what date the programme airs, and episodes which contains a link to a page on the episodes.
Also, what I am trying to do is see if I can get all records which are episodes to be formatted like this:
TV Show showing on Channel1 May 4th - 2:00pm "Celebrity Gossip" Set Reminder
TV Show showing on Channel1 May 4th - 2:30pm Set Reminder
with the episodes not having data being shown as blank, episodes with titles shown as in "quotation marks" like above.
Any help would be much appreciated, it will help my project a lot!