Xyphon Posted December 30, 2007 Share Posted December 30, 2007 Hi. I have read the tutorial on paginaiton on PHPfreaks tutorials, but I sitll dont get it. Can someone paginate <?php include('Connect.php'); include('top.php'); $result = mysql_query("SELECT * FROM pokemon_info ORDER BY pokemon_level DESC"); while($row = mysql_fetch_array($result)){ echo "<table border='1' height='20' width='400' bgcolor='lightgrey'>"; echo "<th><b>User ID: </b><br /></th><th><b>Level: </b><br /></th><th><b>Icon: </b></th><th>Pokemon Name:</th>"; echo "<tr>"; echo "<tr><td><a href='viewprofile.php?id=" . $row['user_id'] . "'>" . $row['user_id'] . "</a></td><td><a href='viewparty.php?id=" . $row['user_id'] . "'>" . $row['pokemon_level'] . "</a></td><td><a href='viewparty.php?id=" . $row['user_id'] . "'><img border='0' src='" . $row['pokemon_icon'] . "'></a></td><td><a href='viewprofile.php?id=" . $row['user_id'] . "'>" . $row['pokemon_name'] . "</a></td><td>"."\n"; echo "</table>"; } include('bottom.php'); ?> For me for future reference? If not can someone help me? Thanks in advanced. Quote Link to comment https://forums.phpfreaks.com/topic/83673-pagination/ Share on other sites More sharing options...
Psycho Posted December 30, 2007 Share Posted December 30, 2007 Instead of having someone else do it for you (where you will not learn) why don't you ask about what exactly you don't understand? Quote Link to comment https://forums.phpfreaks.com/topic/83673-pagination/#findComment-425689 Share on other sites More sharing options...
Xyphon Posted December 30, 2007 Author Share Posted December 30, 2007 I dont undersatnd like, any of it. And in the tutorial I dont understand where the content is put in. Quote Link to comment https://forums.phpfreaks.com/topic/83673-pagination/#findComment-425706 Share on other sites More sharing options...
Psycho Posted December 30, 2007 Share Posted December 30, 2007 Well, these forums are here for us to help you help yourself. If we did it for you then you will just be back here next time asking us to do something for you because you couldn't take the time to learn how to do it. That being said, I will be happy to help you work through this problem. Let's start with the first block of code: <?php $limit = 25; // Sets how many results shown per page $query_count = "SELECT count(*) FROM table"; // Sets what we want to pull from the database // count(*) is better for large databases (thanks Greg!) $result_count = mysql_query($query_count); // Pulls what we want from the database $totalrows = mysql_num_rows($result_count); // This counts the number of users ?> What part of that do you not understand? For the parts you do understand, please modify it to your needs and post it. Once we get that worked out we will move on to the next block of code. Quote Link to comment https://forums.phpfreaks.com/topic/83673-pagination/#findComment-425717 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.