MySQL will only accept dates in the form of YYYY-MM-DD. If your users are entering them in a different format, in PHP you can use something like:
$thedate = date ('Y-m-d', strtotime($user_entered_date));
Hey I like this idea, One question though. If the user enters 3-4-2003 when it goes to...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.