<?php
/************************************************************************
- * Mailer v0.2.1-FINAL Start: 28/06/2011 *
- * =================== Last change: 28/06/2011 *
+ * Mailer v0.2.1-FINAL Start: 06/28/2011 *
+ * =================== Last change: 06/28/2011 *
* *
* -------------------------------------------------------------------- *
* File : what-cash_coupon.php *
UNIX_TIMESTAMP(d.`coupon_expired`) AS `coupon_expired`,
d.`coupon_type`,
d.`total_created`,
- d.`total_used`,
+ d.`total_cashed`,
d.`points`,
d.`coupon_description`
FROM
} // END - if
// Update count as well
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_coupon_data` SET `total_used`=`total_used`+1 WHERE `id`=%s AND `total_used` < `total_created` LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_coupon_data` SET `total_cashed`=`total_cashed`+1 WHERE `id`=%s AND `total_cashed` < `total_created` LIMIT 1",
array(bigintval($content['coupon_id'])), __FILE__, __LINE__);
// Does it work?
displayMessage(getMaskedMessage('MEMBER_COUPON_CODE_CASHED', $content['points']));
} else {
// No coupon found
- displayMessage('{--MEMBER_COUPON_CODE_ALREADY_USED--}');
+ displayMessage('{--MEMBER_COUPON_CODE_ALREADY_CASHED--}');
}
// Free the result