Page 1 of 1

BD for listing mod

Posted: Tue Nov 14, 2006 3:39 pm
by acpjax
Ok.. so kind of a open ended question im looking for suggestions.

Im building a booking mod for a classified web page im building and much thanks to The Ninja Space Goat for helping me out with some great information to get me going.

My question is if you were creating a your own booking/availibility what information would you pass back and for from the DB

The plan is to have a calendar display on each listing that shows when that object is and isnt avalible.

And then in the admin area where a user will modify their listing there will be a section to reserver and unreserve days/weeks/months.

Currently im trying to figure out the best information and how to pass that information to the db to make it easy to call back to the calendar.

To update the table im thinking of passing the below information to the tables..

$listingid to make it specific to each listing..
$date or range of dates specified
$avalible yes or no

and then when someone views the listing do the following

Onload call the following info

dates specific to the $listingid and if they are availible or not... then somehow format to the calendar.

this is my first real web app so be gentle with me. Am i way off? does that even make any sence? or should i just pack it up now?

Posted: Tue Nov 14, 2006 3:44 pm
by John Cartwright
My question is if you were creating a your own booking/availibility what information would you pass back and for from the DB
The only thing I would be passing around is the date (atleast when doing searches).
If I wanted to pull up a specific listing then the only thing I'd pass around is the listing id number.

Posted: Tue Nov 14, 2006 4:16 pm
by acpjax
Thankyou... Question is if i want to allow the owner of the listing to specify the dates reserved. then when they click submit after specifiing the date wont i need to pass both the date and the listingid?

Posted: Tue Nov 14, 2006 5:25 pm
by John Cartwright
Like I briefly mentioned, when you are searching for availabilities -- however you have set it up -- you will likely have to pass around a start point (a timestamp perhaps) to which you want to display the availabilities. Lets take a step back however, because I don't really know how you have your current implementation. This could vary alot, so it may be best if you post your database structure.

Posted: Tue Nov 14, 2006 6:30 pm
by acpjax
currently there is no DB structure for this portion of it... Im in the proccess of trying to decide how im going to design that as well.. Im compleatly open for suggestions.

Posted: Tue Nov 14, 2006 6:44 pm
by John Cartwright
In that case I would recommend you poke around at some other calender/booking systems' database structures and functionality to get some ideas. There was a thread very recently of which this was discussed.

Do a bit more brainstorming, then I'll see if I can nudge you a bit closer.