How would I paginate to 5 results in each page this query?
The better way to use db_select with called as query extender.

Here is an example

$query = db_select('rss_table')
  -&gt;extend('PagerDefault')
  -&gt;limit(5);


Then theme_pager() can be used for outputting a pager.

For more detailed example check out

Either way to use pagination

 function pager_array_splice($data, $limit = 9, $element = 0) {

             global $pager_page_array, $pager_total, $pager_total_items;

                $page = isset($_GET['page']) ? $_GET['page'] : '';

  // Convert comma-separated $page to an array, used by other functions.
                $pager_page_array = explode(',', $page);

  // We calculate the total of pages as ceil(items / limit).
                $pager_total_items[$element] = count($data);
                $pager_total[$element] = ceil($pager_total_items[$element] / $limit);
                $pager_page_array[$element] = max(0, min((int)$pager_page_array[$element], ((int)$pager_total[$element]) - 1));
                return array_slice($data, $pager_page_array[$element] * $limit, $limit, TRUE);
}




 $query = db_select('rss_table','t');
            $query-&gt;fields('t');

           $resultget=$query-&gt;execute();

           $result = $resultget-&gt;fetchAll();
              $limit=5;
              $output = pager_array_splice($result, $limit); 
              $html='';

   foreach ($output as $dbrow) {

                    $items[]=(array)$dbrow;
                    $title = $dbrow-&gt;title;
                    $description = $dbrow-&gt;description;

$html.="         //HTML code here//       ";



 }


  $output1 = theme('item_list', array(
    'items' =&gt; $items));

    echo $html;


You can use it as in the form of table too or append it to the form as well. This is the way to use pagination.

Use this code to modify as per desired output.

Hope it works for you!