I have a table of withdrawal requests that has a datetime field called 'create_date'
I need to query that table to see if a member has submitted a withdrawal request within the past 24 hours
If they have, I need just the most recent record within 24 hours that matches their member ID.
any suggestions.
I thought it was something like this, but it isn't working.
SELECT wthd_id, gross, net, create_date
FROM withdraw_recs
WHERE mem_id = '$member_id'
AND create_date<=date_sub(now(), INTERVAL -24 hour)
ORDER BY create_date desc
LIMIT 1