[TYPO3-project-seminars] Calendar Base and Seminar...

Niels Pardon mail at niels-pardon.de
Sun Apr 13 14:59:47 CEST 2008


Hi Kim!

Kim Holberg Andersen schrieb:
> "Basically there is one question: is there an option in the database 
> table of tx_seminar, which defines "available", "limited", or "sold 
> out"? If not, could you create it during an sql query?"
> 
> I cannot answer this as i have no experience with sql databases and sql 
> queries.
> 

You can count all registered seats from tx_seminars_attendances for a 
specific event and compare it with the attendances_max and 
attendances_min columns in tx_seminars_seminar for the event.

- number of registered seats < attendances_min => available
- number of registered seats < attendances_max and number of registered 
seats >= attendances_min => enough
- number of registered seats = attendances_max => sold out

You can have a look at the seminars source code 
(tx_seminars_seminar->countAttendances()) to get an idea how the sql 
query could look like.

Greets,

Niels


More information about the TYPO3-project-seminars mailing list