Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 0,10"); } elseif($next == "1") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 10,10"); } elseif($next == "2") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 20,10"); } elseif($next == "3") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 30,10"); } elseif($next == "4") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 40,10"); } elseif($next == "5") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 50,10"); } elseif($next == "6") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 60,10"); } elseif($next == "7") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 70,10"); } elseif($next == "8") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 80,10"); } elseif($next == "9") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 90,10"); } elseif($next == "10") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 100,10"); } elseif($next == "11") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 110,10"); } elseif($next == "12") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 120,10"); } elseif($next == "13") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 130,10"); } elseif($next == "14") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 140,10"); } elseif($next == "15") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 150,10"); } elseif($next == "16") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 160,10"); } elseif($next == "17") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 170,10"); } elseif($next == "18") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 180,10"); } elseif($next == "19") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 190,10"); } elseif($next == "20") { $res = $db->Execute("SELECT * FROM ent_humor WHERE catagory='Jokes' ORDER BY title DESC LIMIT 200,10"); } $prev = $next - 1; if($prev == "0") { $prev = ""; } $next = $next + 1; ?> "0" || $prev == "") { echo "<< previous 10 items

"; } ?> next 10 items >>

"; } ?> EOF) { $row=$res->fields; echo "Title - $row[title]
$row[content]


"; $res->MoveNext(); } ?>