Adding of network advert types partly finished, hard-coded table type fixed to dynamic
[mailer.git] / inc / db / lib-mysql3.php
index 13d333d1b2e16f99c1cb5206e88ff7a0470ba18b..ab53b7041b94b2a85a1aff213e561a91bb5aa69b 100644 (file)
@@ -71,8 +71,12 @@ function SQL_QUERY ($sqlString, $F, $L) {
        // Remove \t, \n and \r from queries they may confuse some MySQL version I have heard
        $sqlString = str_replace("\t", ' ', str_replace("\n", ' ', str_replace("\r", ' ', $sqlString)));
 
-       // Compile config out
-       $sqlString = FILTER_COMPILE_CONFIG($sqlString, true);
+       // Replace {PER}
+       $sqlString = str_replace('{PER}', '%', $sqlString);
+
+       // Compile config entries out
+       $eval = "\$sqlString = \"".FILTER_COMPILE_CONFIG(escapeQuotes($sqlString))."\";";
+       eval($eval);
 
        // Starting time
        $querytimeBefore = microtime(true);