/*
                 * Enable debugging if you want o view query errors
                 */
                $pager->setDebug(false);
                /*
                 * The paginate() function returns a mysql result set
                 * or false if no rows are returned by the query
                 */
                $rs = $pager->paginate();
                if (!$rs) {
                    $topic = "Found 0 results on <u>" . $what . "</u> in <u>" . $where . "</u>";
                } else {
                    $counter = 1;
                    $results = "";
                    while ($row = mysql_fetch_assoc($rs)) {
                        $results .= getResultHTML($where, $counter, $row['id'], $row['title'], $row['url'], $row['phone'], $row['street'], $row['city']);
                        $counter++;
                    }
                    //Display the full navigation in one go
                    $pagination = $pager->renderFullNav();
                    $total_no_of_results = 0;
                    $total_no_of_results = $pager->getResultsCount();
                    $topic = "Found " . $total_no_of_results . " results on <u>" . $what . "</u> in <u>" . $where . "</u>";
                }
            }
        }
    }
}
?>