commit c5d77dc4fdd85fe4dfa9f667b0a5f01d3146ce43 from: Jeremy Jackson date: Sun May 14 19:24:55 2023 UTC Fix num rows call commit - 589317f82e7e3e5dd0164e810701380cdc2e3a6e commit + c5d77dc4fdd85fe4dfa9f667b0a5f01d3146ce43 blob - a9c1488b9c7cbcf9979b191a5807d614bad094d6 blob + 2bc8ab97652e938d95d708ea42932946fd5a6e15 --- alexandria/search.php +++ alexandria/search.php @@ -146,6 +146,7 @@ function numremove($word) $statement->execute(); $result = $statement->get_result(); + $numberOfRows = $result->num_rows; print "Search Results"; include("main-header.txt"); @@ -158,14 +159,14 @@ function numremove($word)

Search Results

'; - if (mysqli_num_rows($result) < 1) + if ($numberOfRows < 1) { print "
No results were found.
"; return; } - print "

" . mysqli_num_rows($result) . " results were found matching your search."; + print "

" . $numberOfRows . " results were found matching your search."; $start = (($page - 1) * MAX_RESULTS) + 1; $end = ($page * MAX_RESULTS); - if ($end > mysqli_num_rows($result)) $end = mysqli_num_rows($result); + if ($end > $numberOfRows) $end = $numberOfRows; print "
Viewing results $start to $end."; print ''; print ''; @@ -209,7 +210,7 @@ function numremove($word) print ""; print ""; print ""; - $next = mysqli_num_rows($result) - $i ; + $next = $numberOfRows - $i ; if ($next > MAX_RESULTS) $next = MAX_RESULTS; print ""; }
Game NameShrine Status