Akshay Mohite Akshay Mohite - 1 year ago 80
MySQL Question

How to find Current Date is between Fromdate and todate

I have Customers Booking Table where multiple customers are there also one customer can have multiple orders so from that table i have to find which is current or active order of Customer.There are two column From Date and To date.I want to trace order of customer which is active and want answer count of orders of customer is active.

Answer Source

Try this

SELECT * FROM `table` WHERE CURDATE() between fromdate and todate
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download