Execute("SELECT * FROM ent_humor WHERE catagory='Pictures' ORDER BY title ASC LIMIT $sqlSkip,$itemsPerPage"); // SQL Query for Number of Pages... $sqlResultItemNr = $db->Execute("SELECT COUNT(*) FROM ent_humor WHERE catagory='Pictures'"); $nrItems = $sqlResultItemNr->fields['COUNT(*)']; $nrPages = ($nrItems / $itemsPerPage) + 1; // Display Page Bar... echo "

Page: "; for ($pageNr=1; $pageNr<=$nrPages; $pageNr++) { echo ($pageNr == $pageID) ? "[$pageNr] " : "[$pageNr] "; } // Display Items... while(!$sqlResult->EOF) { $sqlRow = $sqlResult->fields; //echo "


$sqlRow[title]

\n

$sqlRow[content]

\n\n"; echo "

" . $sqlRow['title'] . "

\n

" . parseContent($sqlRow['content']) . "

\n\n"; $sqlResult->MoveNext(); } // Page Footer. html_end() ?>