($total_rows - $lines_per_page)) $begin = $total_rows - $lines_per_page; break; case "Last Page": $begin = $total_rows - $lines_per_page; break; default: $begin = 0; break; } print("\n"); $last_row = $begin + $lines_per_page; if($last_row > $total_rows) $last_row = $total_rows; print(""); for($row = $begin; $row < $last_row; $row++) { print("\n"); print(""); for($field = 0; $field < pg_numfields($result); $field++) { print("\n"); } print("\n"); } print("
$row"); if(pg_fieldisnull($result, $row, $field)) { $price = "NULL"; } else { print(pg_result($result, $row, $field)); } print("
"); // close connection to the database pg_freeresult($result); pg_close($connection); $total_pages = ($total_rows / $lines_per_page) + 1; settype($total_pages, "integer"); if($begin == ($total_rows - $lines_per_page)) $page = $total_pages; else { $page = ($begin / $lines_per_page) + 1.99; settype($page, "integer"); } print("
Page $page of $total_pages
\n"); if($total_rows > $lines_per_page) { if($begin > 0) { print(""); print(""); } if($begin != ($total_rows - $lines_per_page)) { print(""); print(""); } } ?>