/[Frey]/trunk/lib/App/RoomReservation/Reservation.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/App/RoomReservation/Reservation.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1165 by dpavlin, Thu Jul 2 18:28:17 2009 UTC revision 1175 by dpavlin, Mon Jul 6 20:27:57 2009 UTC
# Line 108  sub form_labels {{ Line 108  sub form_labels {{
108          submit => 'Pošalji', # submit button          submit => 'Pošalji', # submit button
109  }}  }}
110    
111    sub form_value_len {
112            my $self = shift;
113            my $sth = $self->dbh->prepare(qq{
114                    select * from reservation limit 1
115            });
116            $sth->execute;
117            my @columns = $sth->fetchrow_array;
118    
119            $sth = $self->dbh->prepare(qq{
120                    select
121            } . join(',', map { "max(length($_)) as $_" } grep { !/^_/ && !/id/ } @{ $sth->{NAME} } ) . qq{
122                    from reservation
123            });
124            $sth->execute;
125            my $max_len = $sth->fetchrow_hashref;
126            warn "# max_len = ", $self->dump( $max_len );
127            return $max_len;
128    }
129    
130  sub BUILD {  sub BUILD {
131          my $self = shift;          my $self = shift;
132          my $email = $self->email;          my $email = $self->email;

Legend:
Removed from v.1165  
changed lines
  Added in v.1175

  ViewVC Help
Powered by ViewVC 1.1.26