mmmissymunchkin Posted March 27, 2010 Share Posted March 27, 2010 I need some help with creating Pagination for my database. I've been looking for hours for tutorials or some kind of help with this and have found nothing I have it set up on this page here http://deliquesce.co.cc/pages/graphics/icons.php And this is the Code I have <? //connect to mysql //change user and password to your mySQL name and password mysql_connect("****", "****", "***"); //select which database you want to edit mysql_select_db("a3441820_graphic"); //select the table $result = mysql_query("SELECT * FROM `icons` LIMIT 24"); //grab all the content while($r=mysql_fetch_array($result)) { //the format is $variable = $r["icons"]; //modify these to match your mysql table columns $id=$r["id"]; $iconimg=$r["iconimg"]; //display the row echo "<img id=icons src=$iconimg></img>"; } ?> This works perfectly fine until I try to combine it with the coding for the pagination. Does anyone know how I can get this to work properly or direct me to a tutorial that will show me how to create a proper display of my MySQL data with the pagination? Quote Link to comment https://forums.phpfreaks.com/topic/196724-pagination-for-mysql-database/ Share on other sites More sharing options...
fenway Posted March 27, 2010 Share Posted March 27, 2010 First, never post login credentials to your DB. Second, there are countless tutorials. Quote Link to comment https://forums.phpfreaks.com/topic/196724-pagination-for-mysql-database/#findComment-1032842 Share on other sites More sharing options...
DaiLaughing Posted March 28, 2010 Share Posted March 28, 2010 Why would you need anything more? That will display a page of 24 items. If the problem is with the pagination code (whatever you mean by that) you need to post that. Quote Link to comment https://forums.phpfreaks.com/topic/196724-pagination-for-mysql-database/#findComment-1032923 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.