>Boat A.
>April 18, 19, &20
>April 26/27
>May 17-June 22
>June 25-october 19

Just off the top of my head:

1) A table for boats that has a record for each boat.
2) A table for trips that includes the boat_id, the departure date, and the return 
date.

To get the info for a certain date, you could do this:

SELECT b.boat_name, t.departure, t.arrival
FROM boatTbl b, tripTbl t
WHERE
b.boat_id = t.boat_id
AND t.departure <= <cfqueryparam value="#yourDate#" cfsqltype="CF_SQL_DATE">
AND t.arrival >= <cfqueryparam value="#yourDate#" cfsqltype="CF_SQL_DATE">
ORDER BY
t.departure, t.arrival, b.boat_name

I think that should get you started (unless someone has a better suggestion, which is 
possible). Of course, the database you're using will affect the actual query syntax.

Scott
--------------------------------
Scott Brady
http://www.scottbrady.net/
 
             
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to