jasraj Posted August 7, 2009 Share Posted August 7, 2009 Hey, I been tryin to do pagination for my php coursework, i have done few tutorials online but i still cant get it to work. Help The code below is the page i'm tryin to put the pageination on. <?php session_start(); include('../library/connectdb.php'); include('../library/selectdb.php'); // the below relesaship brings in the venues table and artists tables via there ids which are on the gigs table, this we allow me to bring in any fileds from these three tables. $result = "SELECT * FROM gigs LEFT JOIN artists ON gigs.artist_id=artists.artist_id LEFT JOIN venues ON gigs.venue_id=venues.venue_id ORDER BY gig_id DESC"; $result = mysql_query( $result ) or die ( mysql_error() ); while($row = mysql_fetch_assoc($result)) { ''; $table.= ' <tr> <td>'.$row['artistname'].'</td> <td>'.$row['venuename'].'</td> <td>'.$row['status'].'</td> <td><a href = "details.php?id='.$row['gig_id'].'" >Details</a></td> </tr> '; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Gig Bookers Admin</title> <link rel="stylesheet" type="text/css" href="../library/style.css"/> </head> <body> <div id="wrap"> <div id="header"> <h1><a href="#">Gig Bookers Admin</a></h1> <h2>Online Event Ticket Booking</h2> </div> <!-- End Header --> <div id="top"></div><!-- End Top --> <div id="menu"> <?php include("../website/naviagation.php") ?> </div> <!-- End Menu --> <div id="content"> <div class="left"> <table> <tr> <th>Artist</th> <th>Venue</th> <th>Status</th> <th>View Details</th> </tr> <?php echo $table ?> </table> </div> <!-- End Left --> <div class="right"> <?php include("../website/rightside.php") ?> </div> <!-- End Right --> <div style="clear: both;"></div><!-- End Clear --> </div> <!-- End --> <div id="bottom"></div> <!-- End Bottem --> <div id="footer"> <p>Designed by Jasraj Gill</p> </div> <!-- End Footer --> </div> <!-- End Wrap / All Div Tags --> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/169244-php-pagination/ Share on other sites More sharing options...
Maq Posted August 7, 2009 Share Posted August 7, 2009 1) Please use tags. 2) What is the issue you're encountering? Quote Link to comment https://forums.phpfreaks.com/topic/169244-php-pagination/#findComment-893086 Share on other sites More sharing options...
jigsawsoul Posted August 7, 2009 Share Posted August 7, 2009 Hey fella, check out this have a go and if you come across any problems just posted up the problems you have. http://net.tutsplus.com/tutorials/php/how-to-paginate-data-with-php/ do this ! Quote Link to comment https://forums.phpfreaks.com/topic/169244-php-pagination/#findComment-893090 Share on other sites More sharing options...
jasraj Posted August 7, 2009 Author Share Posted August 7, 2009 Hey MAQ, the problem is that i just cant get pagination to work.... it just goes over my head... Can you help Quote Link to comment https://forums.phpfreaks.com/topic/169244-php-pagination/#findComment-893094 Share on other sites More sharing options...
Maq Posted August 7, 2009 Share Posted August 7, 2009 Hey MAQ, the problem is that i just cant get pagination to work.... it just goes over my head... Can you help Let me repeat myself. What exactly is the problem? "Doesn't work" is meaningless. Are there errors? Blank screen? What happens? What do you expect to happen? Quote Link to comment https://forums.phpfreaks.com/topic/169244-php-pagination/#findComment-893097 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.