This topic is locked

complicated situation lookup.

11/27/2008 3:28:49 AM
PHPRunner General questions
M
maxcolo author

Premised Jane she has helped a lot already me, but I have not resolved yet
I have this situation


and two table interest:




I would want to understand what codiche to insert in WHERE CLOSE, to see only the free tables in the date that the consumer has selected in the form prenotazioni_tavoli_cena_add.php .

For example if I in the form selected 2008-11-26, it made me see only the available tables in this date.

But if the consumer chose a different date the scenery you/he/she would be different.If you have a different situation to resolve this problem there would infinitely be thankful.

I thank you all of the splendid collaboration and for the splendid program.

J
Jane 11/27/2008

Hi,
unfortunately there is no easy way select free tables only in the id_tavolo dropdown because it is dependent on date selected before.

In general you need to check selected date, select records from database and form dropdown manually in the custom JavaScript.

Unfortunately we don't have a ready to go solution for this.
As workaround you can check selected date and table in the Before record added event on the Events tab and return error message if table is not free.

M
maxcolo author 11/28/2008

Hi Jane,

Thanks to this situation and to a query created sql I would succeed in seeing what serves me.

I would have resolved with the page search.php, would use only me obligatory to set the field id_tavolo=vuoto and to hide it to the user leaving only the field dates. And' possible?