This topic is locked
[SOLVED]

 Function Before add.

9/7/2008 1:45:12 AM
PHPRunner General questions
M
maxcolo author

Hi,

I have one table called "reservation" :

name

email

date

person

service1 (select value : fumeurs,not_fumeurs)

service2 (select value : outside, inside)
and another table called "seats_total"

seat_total_fumeurs =100 for day

seat_total_notfumeurs=50 for day

seat_total_outside=100 for day

seat_total_inside=100 for day

if you have an other solution to advise to me it is very chip ax.

What is the function code "Before Add" for control action:

If the sum of the places in that day is > of seats_total =message echo.........not avaiable seats, else OK Add.

Best regards

Max
Sorry for my english but I am a italian user.

if someone has already worked on one reservation script tables restaurant, and it wants give some council to me, it are pleasing.

J
Jane 9/8/2008

Hi,
you can check entered values in the Before record addedevent on theEvents tab.

Select number of records in the main table and compare it with value in your second table.