Click to See Complete Forum and Search --> : Problems getting SQL Statement into PHP Site


Bosstone
01-29-2008, 02:29 PM
Hi Folks,

I want to display the seating plan of a theatre on a PHP site:

Table: seat

Columns:

seat
row
ID
date
occupied (yes/no)

Actually I have only worked with dynamic results - now I have a static
output - and there the problems begin... :-(

What can I do, that the result of "row: 10" , "seat:15" will mark row 10, cell 15? Or what can I do, that all seats which are not occupied will be shown with a 0 in my table (10 rows, 15columns)?

Thanks for your feedback and your help!

Best regards,

Stefan

hex1a4
01-29-2008, 05:08 PM
Just change the datatype of the 'occupied' field to boolean and set default value to false.

Even though most databases often have true/false keywords, they use one bit values for booleans--0=false, 1=true.