07-21-2010, 09:32 PM
|
#2 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Location: California
Posts: 82
Thanks: 0
|
Since you're limiting them to two entries, you're going to need some application side logic to control that.
This could be pretty simple to integrate into the user flow if you have a specific page that they need to hit when registering a reservation.
For example:
PHP Code:
$sql = "SELECT 1 WHERE member_ID = {$memberID}";
$res = mysql_query($sql);
$numRows = mysql_num_rows($res);
if($numRows < 2)
{
// they can add a new one
}
else
{
// they can't
}
Also note that you'll need a cron or script that will automagically clean up the table to remove all their past reservations. Or, you'd need a date where clause on the query.
|
|
|
|