Hi,
I am using this code to make my query nice
This is working perfect in my local system.
PCRE (Perl Compatible Regular Expressions) Support is enabled in both server and local
Please help
Thanks and regards
RuthC
I am using this code to make my query nice
Code:
// Make nice query, remove multiple: spaces, '`' (safe slashes), 'AND', 'OR', ... $pattern = array ( '/(AND[\s])+/', '/(OR[\s])+/', '/\s+/', '/`+/', '`^[^\w\d]`', '`[^`\w\d]$`' ); $replace = array ( 'AND ' , 'OR ' , ' ' , '`' , '' , '' ); $search_preferences['SQL_Query'] = preg_replace ($pattern, $replace, $search_preferences['SQL_Query'] );
PCRE (Perl Compatible Regular Expressions) Support is enabled in both server and local
Please help
Thanks and regards
RuthC
Comment