I've got my pagination script working, but now I need help trying to get it to extract data from 2 different sources.
The episode data is stored in table episodes, whilst the main table (where the info on airdates for episodes is stored in epdata2).

This is my code:

 * 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.                     *
    	<title> Pagination Test Site</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; }
			//Require the file that contains the required classes
			//PhpMyCoder Paginator
			$paginator = new pmcPagination(20, "page");
			//Connect to the database
			//Select DB

			//Select only results for today and future
			$result = mysql_query("SELECT * FROM epdata2 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'],
			//Show the paginated results
			$paginator->paginate ();
		?><? include("footer1.php"); ?>
			//Show the navigation

Basically, what I'm trying to do is select certain records from the episodes table, and have them with certain airdates, stored in the datetime format, similar to this:

2010-04-26 13:00:00 13:30:00 Episode 1
2010-05-04 00:15:00 00:50:00 Episode 2

I'm trying to get it to remove the record after it expires (i.e. hide it) - one bug I found today was the event disappeared during it, at 10:09am it did not show, despite the fact the event expired at 10:30am. (this is UK time, GMT).

Anyone able to help me please, I would much appreciate this?

7 Years
Discussion Span
Last Post by sourcebits

You may write alias based query like $sql="select x.title,x.name,y.salary from a,y where x.id=y.id limit 0,10";

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.