bug 447771

This commit is contained in:
Marc Delisle
2001-08-04 23:51:39 +00:00
parent 885ddb96cd
commit d8ce0cbeaf
2 changed files with 3 additions and 1 deletions

View File

@@ -7,6 +7,8 @@ $Source$
2001-08-04 Marc Delisle <lem9@users.sourceforge.net>
* ob_lib.inc.php3, oops: must be PHP3 compatible
* sql.php3: bug 447771 bad counting of entries, patch developed
from an idea of Ignacio Vazquez-Abrams (ivazquezabrams)
2001-08-04 Steve Alberty <alberty@neptunlabs.de>
* lib.inc.php3: fixed #444017 (thanks anonymous)

View File

@@ -131,7 +131,7 @@ else {
}
else if ($is_select) {
// reads only the from-part of the query...
$array = split(' from | FROM ', $sql_query, 2);
$array = split(' from | FROM | order | ORDER | having | HAVING | limit | LIMIT | group by | GROUP BY', $sql_query);
if (!empty($array[1])) {
// ... and makes a count(*) to count the entries
$count_query = 'SELECT COUNT(*) AS count FROM ' . $array[1];