Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

YMM Split Page Results? (pagination)


panthercoug

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>

Link to comment
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 ...

Link to comment
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 ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...