diff --git a/tbl_export.php b/tbl_export.php index 6fe310896c..557dcb352b 100644 --- a/tbl_export.php +++ b/tbl_export.php @@ -37,7 +37,7 @@ if (! empty($sql_query)) { // Need to generate WHERE clause? if (isset($where_clause)) { - $temp_sql_array = explode("where", strtolower($sql_query)); + $temp_sql_array = preg_split("/\bwhere\b/i", $sql_query); // The part "SELECT `id`, `name` FROM `customers`" // is not modified by the next code segment, when exporting