Lorenz
|
| Posted: 09/27/2002, 3:47 AM |
|
Hello!
I have a search form to insert a date in "yyyy/mm/dd" mode (type text).
Then, I have to extract record from database and visualize them when a field named initial_date is <= of inserted date, and final_date is >= of inserted date. I have customized SQL for other reasons, so I have :
"SELECT ...
FROM ...
WHERE ...
AND (initial_date <= '$date' AND final_date >= '$date')"
It doesn't work! It's not possible to compare texts?
I use Mysql and PHP 4.0. Thanks a lot!
|
|
|
 |
Nicole
|
| Posted: 10/01/2002, 4:26 AM |
|
Lorenz,
first of all please make sure that dates in "yyyy/mm/dd" format are accepted by mysql, i.e. test query against mysql db.
While you find the correct date format when you get the correct query results. I suppose the problem is with dare format. In case I'm right please refer to the following article that describes how to convert dates in CC: http://www.gotocode.com/art.asp?art_id=132&
|
|
|
 |
|