Hi all.
I am having a problem with the BETWEEN statement. This is what I have.
WHERE c.begin_date BETWEEN " . $_POST['fdate'] . " AND " . $_POST['tdate'] . "
AND c.coupon_id = " . $_POST['coupon_id'] . "
AND c.coupon_id = p.coupon_id
AND m.member_id = " . $_POST['member_id'] . "
AND p.completed = 1
AND p.comm_paid = 0
The error I get is:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND AND c.coupon_id = JER493 AND c.coupon_id = p.coupon_id AND m.member_id' at line 25
Can anyone see what is going wrong.