General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 24th, 2004, 10:33 AM
flyingpig flyingpig is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 1 flyingpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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..

Reply With Quote
  #2  
Old February 24th, 2004, 10:38 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > Search date between ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT