16 |
|
|
17 |
my $dbh = $self->dbh; |
my $dbh = $self->dbh; |
18 |
|
|
19 |
|
my $size = $self->room->seats; |
20 |
|
|
21 |
my $sth = $dbh->prepare(qq{ |
my $sth = $dbh->prepare(qq{ |
22 |
update reservation |
update reservation |
23 |
set |
set |
25 |
_seat_number = ( |
_seat_number = ( |
26 |
select |
select |
27 |
min(seat.nr) |
min(seat.nr) |
28 |
from (select generate_series(1,600) as nr) as seat |
from (select generate_series(1,$size) as nr) as seat |
29 |
full join reservation on reservation._seat_number = seat.nr |
full join reservation on reservation._seat_number = seat.nr |
30 |
where id is null |
where id is null |
31 |
group by seat.nr |
group by seat.nr |
84 |
|
|
85 |
if ( $sth->rows == 1 ) { |
if ( $sth->rows == 1 ) { |
86 |
qq| |
qq| |
87 |
Your <em>reservation is canceled</em>, thanks for your effort to provide seat to somebody else |
Vaš <em>dolazak je odjavljen</em>. |
88 |
|
|
89 |
|
Hvala što ste omogućili dolazak nekom drugom! |
90 |
|; |
|; |
91 |
} else { |
} else { |
92 |
die qq|<error>Can't find reservation which you are trying to cancel.<br> |
die qq|<error>Can't find reservation which you are trying to cancel.<br> |