Permalink
Browse files

Used preg_split() instead of explode() to split sql query,

Since explode is case sensitive and if table or column contains substring "where" it will give an error
  • Loading branch information...
1 parent ea0f6d0 commit ae3d3f5a849b22b41e86d210f005dce8d631ce24 @hisamith hisamith committed Feb 20, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 tbl_export.php
View
@@ -37,7 +37,7 @@
// Need to generate WHERE clause?
if (isset($where_clause)) {
- $temp_sql_array = explode("where", $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

0 comments on commit ae3d3f5

Please sign in to comment.