Hi
I had a mysql data base and had a date column in it.
Date is like : date("Y-m-d"),

I need to search in the data base between two days,
select users who registered between 2009-12-13 and 2009-12-25.

Please help me
thanks in advance

SELECT * FROM `table_name` WHERE (DateCol >= "2009-12-13") AND (DateCol <= "2009-12-25")

SELECT * FROM `table_name` WHERE DateCol BETWEEN '$first-range' AND '$second-range'

Thank you for this topic / answers. Just what i need

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.