]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-cash_coupon.php
Extension ext-blacklist continued:
[mailer.git] / inc / modules / member / what-cash_coupon.php
index c1d813321ac43aca12e69f078354c5fde6565857..71fdec3434c73ead517f632c1fb85b9f13267816 100644 (file)
@@ -57,27 +57,27 @@ if (isFormSent()) {
        if (isPostRequestElementSet('coupon_code')) {
                // Search for the coupon
                $result = SQL_QUERY_ESC("SELECT
-       c.`coupon_id`,
-       c.`userid`,
-       c.`coupon_code`,
-       UNIX_TIMESTAMP(d.`coupon_created`) AS `coupon_created`,
-       UNIX_TIMESTAMP(d.`coupon_expired`) AS `coupon_expired`,
-       d.`coupon_type`,
-       d.`total_created`,
-       d.`total_cashed`,
-       d.`points`,
-       d.`coupon_description`
+       `c`.`coupon_id`,
+       `c`.`userid`,
+       `c`.`coupon_code`,
+       UNIX_TIMESTAMP(`d`.`coupon_created`) AS `coupon_created`,
+       UNIX_TIMESTAMP(`d`.`coupon_expired`) AS `coupon_expired`,
+       `d`.`coupon_type`,
+       `d`.`total_created`,
+       `d`.`total_cashed`,
+       `d`.`points`,
+       `d`.`coupon_description`
 FROM
-       `{?_MYSQL_PREFIX?}_user_coupons` AS c
+       `{?_MYSQL_PREFIX?}_user_coupons` AS `c`
 INNER JOIN
-       `{?_MYSQL_PREFIX?}_coupon_data` AS d
+       `{?_MYSQL_PREFIX?}_coupon_data` AS `d`
 ON
-       c.`coupon_id`=d.`id`
+       `c`.`coupon_id`=`d`.`id`
 WHERE
-       c.`coupon_code`='%s' AND
-       c.`userid`=%s AND
-       c.`cashed_on` IS NULL AND
-       UNIX_TIMESTAMP(d.`coupon_expired`) > UNIX_TIMESTAMP()
+       `c`.`coupon_code`='%s' AND
+       `c`.`userid`=%s AND
+       `c`.`cashed_on` IS NULL AND
+       UNIX_TIMESTAMP(`d`.`coupon_expired`) > UNIX_TIMESTAMP()
 LIMIT 1",
                        array(
                                postRequestElement('coupon_code'),
@@ -165,7 +165,7 @@ LIMIT 1",
        }
 } else {
        // Load form template
-       loadTemplate('member_cash_coupon', false);
+       loadTemplate('member_cash_coupon', FALSE);
 }
 
 // [EOF]