]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_rallye_prices.php
Outputs an indigo, red, non-clickable menu entry if action file is missing
[mailer.git] / inc / modules / admin / what-config_rallye_prices.php
index ddb605da4974e3274ba793bb252cefd1ced84f9c..854f207ef9ec6c9bcd12266207455e28b3d0e003 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) {
@@ -89,11 +89,11 @@ VALUES ('%s','%s','%s','%s')",
        } elseif (isPostRequestElementSet('change')) {
                // Change entries
                foreach (postRequestElement('level') as $id => $level) {
-                       // Secure ID
+                       // Secure id
                        $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),