bug 447771
This commit is contained in:
@@ -7,6 +7,8 @@ $Source$
|
|||||||
|
|
||||||
2001-08-04 Marc Delisle <lem9@users.sourceforge.net>
|
2001-08-04 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* ob_lib.inc.php3, oops: must be PHP3 compatible
|
* 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>
|
2001-08-04 Steve Alberty <alberty@neptunlabs.de>
|
||||||
* lib.inc.php3: fixed #444017 (thanks anonymous)
|
* lib.inc.php3: fixed #444017 (thanks anonymous)
|
||||||
|
2
sql.php3
2
sql.php3
@@ -131,7 +131,7 @@ else {
|
|||||||
}
|
}
|
||||||
else if ($is_select) {
|
else if ($is_select) {
|
||||||
// reads only the from-part of the query...
|
// 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])) {
|
if (!empty($array[1])) {
|
||||||
// ... and makes a count(*) to count the entries
|
// ... and makes a count(*) to count the entries
|
||||||
$count_query = 'SELECT COUNT(*) AS count FROM ' . $array[1];
|
$count_query = 'SELECT COUNT(*) AS count FROM ' . $array[1];
|
||||||
|
Reference in New Issue
Block a user