- Code: Select all
// show next and prev page links, if applicable
if($page>1) {
$prev_page = $page-1;
$prev_url = "search.php?$string&page=$prev_page";
if($sort) {
$prev_url .= "&sort=$sort";
}
$prev_link = "<a href=\"".print_url($prev_url)."\"><< Previous Results</a>";
}
if($num_records>($page*$max_records)) {
$next_page = $page+1;
$next_url = "search.php?$string&page=$next_page";
if($sort) {
$next_url .= "&sort=$sort";
}
$next_link .= "<a href=\"".print_url($next_url)."\">Next Results >></a>";
}
if($next_link || $prev_link) {
echo "<p>";
echo $prev_link;
if($prev_link && $next_link) {
echo " | ";
}
echo $next_link;
echo "</p>";
}
(Where I have $next_url and $prev_url, the original code had $next_link and $prev_link, respectively. But there needs to be a different string variable for the URLs or we get the display problem).
The second bug is that db->data_seek is called by search.php, but data_seek is not defined in any of the files in ocs/include/db (i.e., the files that are named db.*.inc.php). So, for example, db.mysql.inc.php needs to have the following code added to it:
- Code: Select all
// move internal result pointer to the specified row number
function data_seek($result, $row_number) {
return mysql_data_seek($result, $row_number);
}
Sorry if I've used odd words to explain these bugs -- I'm not as familiar with PHP as I should be.
Now if someone can help me with my room_id problem, that would be great! (see my previous post).
