1
0
mirror of https://github.com/fspc/Yellow-Bike-Database.git synced 2025-04-04 09:33:24 -04:00

This corrects the sql membership logic.

This commit is contained in:
Jonathan Rosenbaum 2017-07-15 22:08:09 +00:00
parent 2c78a54486
commit 163645a329

View File

@ -95,8 +95,7 @@ contacts.email AS email, contacts.phone AS phone,
transaction_log.date as sort_hours transaction_log.date as sort_hours
FROM transaction_log FROM transaction_log
LEFT JOIN contacts ON transaction_log.sold_to = contacts.contact_id LEFT JOIN contacts ON transaction_log.sold_to = contacts.contact_id
WHERE (SUBSTRING_INDEX(date, ' ', 1) >= DATE_SUB(CURDATE(),INTERVAL $purchased_membership_days DAY) WHERE SUBSTRING_INDEX(date, ' ', 1) <= DATE_ADD(date, INTERVAL 365 DAY)
AND SUBSTRING_INDEX(date, ' ', 1) <= DATE_SUB(CURDATE(), INTERVAL 1 DAY))
AND (transaction_type='Memberships' AND paid=1);"; AND (transaction_type='Memberships' AND paid=1);";
$purchased_membership = mysql_query($purchase_query, $YBDB) or die(mysql_error()); $purchased_membership = mysql_query($purchase_query, $YBDB) or die(mysql_error());