panthercoug Posted December 19, 2012 Share Posted December 19, 2012 Hello, Hopefully some one can help me out on this one. the code below displays all the rows in the table on the product_info page and I would like to make it limited to say 10 rows and if there are more than 10 in have a PREV - NEXT or page number links at the bottom so the 1 page isnt a mile long lol? (pagination) <p><?php echo TEXT_PRODUCTS_CAR_HEADING; ?><p> <?php if (isset($HTTP_GET_VARS['products_id']) && $HTTP_GET_VARS['products_id'] != ''){ $q = tep_db_query("select * from products_ymm where products_id = ". (int) $HTTP_GET_VARS['products_id']); if (tep_db_num_rows($q) > 0) { while ($r = tep_db_fetch_array($q)) { echo '<div id="ymmopt"><ul> <li>' . $r['products_car_year_bof'] . ' - ' . $r['products_car_year_eof'].'</li> <li>' . ($r['products_car_make'] != '' ? $r['products_car_make'] : 'all') . '</li> <li>' . ($r['products_car_model'] != '' ? $r['products_car_model'] : 'all') . '</li> </ul></div>'; } } else { echo '<div></div>'; } } ?> <div style="clear: both;"></div> Quote Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted December 19, 2012 Share Posted December 19, 2012 why don't you define a height for your div and have the rest of the rows hidden, visible by scrolling within the div? Quote :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
panthercoug Posted December 20, 2012 Author Share Posted December 20, 2012 Hey thanks for the idea that is way simpler and suits my needs better anyways lol Quote Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted December 20, 2012 Share Posted December 20, 2012 (edited) though so ;-) ... I used to have an endless form for a callcenter tool a while ago (countless options to choose from) and this is waht I used/did! Edited December 20, 2012 by Monika in Germany Quote :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment 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.