sql_query($sql); $cnt=0 ; while ( $row = $db->sql_fetchrow($result) ) { $table_no[$cnt] = $row["table_no"]; $table_name[$cnt] = $row["table_name"]; $cnt++; } ?> Booking
".$table_name[$ii].""; $count = 1; $sql = "select table_no, seat_no, name from event_wedding_party_booking_data where table_no='".$table_no[$ii]."' order by name"; $result = $db->sql_query($sql); while ( $row1 = $db->sql_fetchrow($result) ) { echo "".$row1["name"].""; $count++; } for ($xx=$count; $xx<=10; $xx++){ echo "空位".$xx.""; } echo "
"; } ?>