Page 1 of 1

PHP Calender + SQL

Posted: Thu Oct 05, 2006 7:24 pm
by Jza
Let me give you guys a brief description of what I'm working on.

- 11 houses that are to be rent out between the remainder of 2007, until 2025.
- Users must be able to load up a website, view a calender and see when the houses are availible to be rented out.

For example, user loads the webpage, selects the house he is interested in, loads up the appropriate month and year, and can see if the house is availible for rent.

This must work of SQL, I can't seem to think of any other options but to do the following:
- One table per house per year, this would lead up to more then 150 tables, I don't think this is very acceptable.

Any idea is helpfull.

Posted: Thu Oct 05, 2006 7:36 pm
by aaronhall
What's the problem with making one table, and storing each house as a row?

Posted: Thu Oct 05, 2006 7:42 pm
by Jza
I knew I wasn't thinking right.

So what you're saying is, 365 fields, 11 rows? x 15?

Or how about, 1 table and it just adds to it

House | Date
1 | feb1
2 | march6

Posted: Fri Oct 06, 2006 12:54 am
by aaronhall
How many properties will each house have?