Jump to content
panthercoug

YMM Split Page Results? (pagination)

Recommended Posts

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>

Share this post


Link to post
Share on other sites

why don't you define a height for your div and have the rest of the rows hidden, visible by scrolling within the div?


:-)

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 ...

Share this post


Link to post
Share on other sites

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 by Monika in Germany

:-)

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 ...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×