This is a discussion on "Help on how to create a date search?" within the ASP.NET Forum section. This forum, and the thread "Help on how to create a date search? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Help on how to create a date search?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Help on how to create a date search?
Hi, Im busy desinging a website for a holiday home rental agency. I want the user to be able to select an arrival date and departure date and then search to display the appartments available within these selected dates. The way I was going to go about creating this facility was using ASP.NET and SQL.
I am fairly new to both and I am a bit stuck on what I need to include in the SQL databse to relate to the dates the user selects form drop down list boxes.. I had thought of including a column for example 'bookdate' and listing all of the dates that the apartment is booked in this column? Then running the query to display apartments which avoid these dates? But this doesnt seem the most efficent way to me and I figured there must be an easier way! Can anyone help me out my mind seems to have gone blank! The selection part will look something like this: ![]() and the results to be displayed like this: ![]() Any help at all will be appreciated, thanks! |
|
|
|
|||
|
Re: Help on how to create a date search?
your best bet would be to write a stored procedure and make an "is_Active Colum".. So your stored procedure will only return information for active listings. so basically a select where is_active = true.
your on the right track.. now. Depending on the amount of calls you are making to the database. and how large it is, you may want to concider storing your data in a DataTable and throwing it in to the session (if performance is an issue at the moment). also for your stored procedure. i would have it take paramaters such as "Book Date" & "Leave Date" . so essentually your stored procedure should return to you the listings starting from book date to the leave date. i'm sure you will have more questions.. "HIT ME " |
|
|||
|
Re: Help on how to create a date search?
here's a simple example to get you going : http://databases.about.com/od/sqlser...toredprocs.htm
|
![]() |
| Tags |
| aspnet, database, search, sql |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to create an expiration date? | csun | PHP Forum | 8 | Sep 11th, 2007 08:11 |
| how to create a search box | geyids | Website Planning | 12 | Apr 10th, 2007 21:19 |
| Search Analyst/Account Executive/SEO/PPC/CPC/Search Engine Optimisation/Pay per Click/London | Web JobBot | Job Opportunities | 0 | Nov 22nd, 2006 10:20 |
| SEO/PPC/Search Engine Optimisation/Pay Per Click/Campaigns/Online/Marketing/Agency/Analyst/Search/Manager/Executive/Manchester | Web JobBot | Job Opportunities | 0 | Nov 17th, 2006 11:11 |
| Changing date format in date picker | AdRock | JavaScript Forum | 1 | Aug 1st, 2006 17:16 |