Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- l.id,
- l.user_id,
- l.order_id,
- l.is_error,
- l.type_id,
- l.code,
- COALESCE(l.act_dt, 0) AS act_dt,
- COALESCE(l.use_dt, 0) AS use_dt,
- l.comment,
- t.nominal,
- t.discount,
- t.discount_type
- FROM
- legacy.data_coupon_list l,
- legacy.data_coupon_list_type,
- legacy.data_order o
- WHERE
- t.id=l.type_id AND
- o.user_id=l.user_id AND
- l.id={$cardId} AND
- (l.act_dt !=0 AND l.act_dt NOT NULL) AND
- (l.use_dt = 0 OR l.use_dt IS NULL) AND
- l.is_error=FALSE
Add Comment
Please, Sign In to add comment