// 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);
// Run SQL command
- //* DEBUG: */ print('F=' . basename($F) . ',L=' . $L . 'sql=' . $sqlString . '<br />');
+ //* DEBUG: */ print('F=' . basename($F) . ',L=' . $L . 'sql=' . htmlentities($sqlString) . '<br />');
$result = mysql_query($sqlString, SQL_GET_LINK())
or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error() . '<br />
Query string:<br />