Fixed a bug line 85: trimming an array!

This commit is contained in:
Loïc Chapeaux
2001-07-07 13:08:20 +00:00
parent 54522e16c7
commit 02df5c20c0

View File

@@ -82,7 +82,7 @@ else {
if (eregi("^SELECT", $sql_query)) if (eregi("^SELECT", $sql_query))
{ {
$array = split(' from | FROM ',$sql_query,2); //read only the from-part of the query $array = split(' from | FROM ',$sql_query,2); //read only the from-part of the query
if (!empty(trim($array[1]))) { if (!empty($array[1])) {
$count_query = "select count(*) as count from $array[1]"; //and make a count(*) to count the entries $count_query = "select count(*) as count from $array[1]"; //and make a count(*) to count the entries
$OPresult = mysql_query($count_query); $OPresult = mysql_query($count_query);
if ($OPresult) { if ($OPresult) {