Fix for broken SQL queries (all). Resolves #84
authorRoland Häder <roland@mxchange.org>
Thu, 19 Feb 2009 23:55:34 +0000 (23:55 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 19 Feb 2009 23:55:34 +0000 (23:55 +0000)
inc/db/lib-mysql3.php

index 0767c5f1628823eea4a731644b4cc9b306f0eae0..90db1da0b7c895dbf5487ff908f58ba9e5e19394 100644 (file)
@@ -50,6 +50,9 @@ function SQL_QUERY ($sql_string, $F, $L) {
        // Starting time
        $querytimeBefore = array_sum(explode(' ', microtime()));
 
+       // Replace {!_MYSQL_PREFIX!} with constant, closes #84. Thanks to profi-concept
+       $sql_string = str_replace("{!_MYSQL_PREFIX!}", constant('_MYSQL_PREFIX'), $sql_string);
+
        // Run SQL command
        //* DEBUG: */ echo $sql_string."<br />\n";
        $result = mysql_query($sql_string, $link)