Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mysql Query! How to Search Between 2 dates?

Status
Not open for further replies.

nfear24

Programmer
Jun 12, 2001
4
US
Im using PHP to access MySql. Im new to MySQL so having some slight problems. Here is what I have to just search by the date.

$query = "select * from record where ".$searchtype." like '%".$searchterm."%'";

Now I want to modify that so i can search between 2 dates. So if they enter 3/19/2003 in a box and 3/23/2003 in another it will return all the results between and including those dates. How do I query this with mysql.

Thanks
 
This is a SQL Server forum - you should post your question in the MySQL forum for a better response. --James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top