|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Search date between ?
Hi there, I have a search form with
--------------------------------------------------------------- exhibition start date: yyyy(pull-down),mm(pull-down),dd(pull-down) exhibition end date: yyyy(pull-down),mm(pull-down),dd(pull-down) submit search --------------------------------------------------------------- Is there anyway to put three option value from pull-down menu together to format date like '2003-09-06' . I kown this does't work but show what Im tring to do " . $_GET["fy"] . "-" . $_GET["fm"] . "-" . $_GET["fd"] . " ..............'2003-09-06' Basically I want to create Query below....which works good only when I put fixed date inside... select * from exhibition where begin_exh >='2003-09-06' and end_exh < '2004-06-20' If anyone can help me please.. |
|
#2
|
||||
|
||||
|
The code you've provided (or something very close to it) should work. PHP parses the variables before sending the string to mysql, so you can build your date in this manner before sending your query.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Search date between ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|