$display) { $num_pages = ceil ($num_records/$display); } else { $num_pages = 1; } // Determine where in the database to start returning results. if (isset($_GET['s'])) { $start = $_GET['s']; } else { $start = 0; } echo ''; ?>
= $start AND id <= ($start + $display)"; $result4 = @mysql_query ($query4); // Run the book database query. $num = mysql_num_rows ($result4); // How many books are there in the WonderClub database? if ($num > 0) { // If it ran OK, display the books. echo "

Huge Assortment of Books at WonderClub.com

"; // Make the links to other pages, if necessary. if ($num_pages > 1) { // Determine what page the script is on. $current_page = ($start/$display) + 1; // If it's not the first page, make a Previous button. if ($current_page != 1) { echo 'Previous '; } // Make all the numbered pages. for ($i = 1; $i <= $num_pages; $i++) { if ($i != $current_page) { echo ''.$i.' '; } else { echo '  ' . $i . ' '; } } // If it's not the last page, make a Next button. if ($current_page != $num_pages) { echo 'Next '; } echo '
'; } echo ''; // Fetch and print all the records. $bg = '#eeeeee'; while ($row = mysql_fetch_array($result4, MYSQL_ASSOC)) { $bg = ($bg=='#eeeeee' ? '#ffffff' : '#eeeeee'); echo ''; } echo '

Title

Author

ISBN

'.$row['isbn13'].'
'; mysql_free_result ($result4); // Free up the resources. } else { // If it did not run OK. echo '

There are currently no '.$fullname.' puzzles available for sale.

'; } ?>