]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_rallye_prices.php
Queries improved, output-bug fixed in points overview
[mailer.git] / inc / modules / admin / what-config_rallye_prices.php
index ddb605da4974e3274ba793bb252cefd1ced84f9c..bce9f0cd18af4d858bd1d411d7c52c98b88ae386 100644 (file)
@@ -49,7 +49,7 @@ if (isGetRequestElementSet(('rallye'))) {
        if (isPostRequestElementSet('add')) {
                if ((isPostRequestElementSet(('level'))) && ((isPostRequestElementSet(('points'))) || (isPostRequestElementSet(('info'))))) {
                        // Submitted data is valid, but maybe we already have this price level?
-                       $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE rallye_id=%s AND price_level='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1",
                        array(bigintval(getRequestElement('rallye')), bigintval(postRequestElement('level'))), __FILE__, __LINE__);
 
                        if (SQL_NUMROWS($result) == 0) {
@@ -93,7 +93,7 @@ VALUES ('%s','%s','%s','%s')",
                        $id = bigintval($id);
 
                        // Update entry
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_prices` SET rallye_id=%s, price_level='%s', points='%s', info='%s' WHERE `id`=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_prices` SET rallye_id=%s, price_`level`='%s', points='%s', info='%s' WHERE `id`=%s LIMIT 1",
                        array(
                        postRequestElement('rallye_id', $id),
                        bigintval($level),