/[SQLSession]/trunk/share/web/templates/sql.html
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/share/web/templates/sql.html

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

revision 10 by dpavlin, Sun Dec 3 00:04:57 2006 UTC revision 15 by dpavlin, Sun Dec 3 14:01:53 2006 UTC
# Line 1  Line 1 
1  <%args>  <%args>
 $page => 1  
2  $sth => undef  $sth => undef
3  </%args>  </%args>
4  <%init>  <%init>
# Line 19  $sth = $result->content('sth') if $resul Line 18  $sth = $result->content('sth') if $resul
18  <% $action->form_field('sql_query') %>  <% $action->form_field('sql_query') %>
19  <% $action->form_field('database') %>  <% $action->form_field('database') %>
20  <% Jifty->web->form->submit( label => 'Try it!' ) %>  <% Jifty->web->form->submit( label => 'Try it!' ) %>
 <% Jifty->web->form->end() %>  
 </&>  
21    
22  % if ( defined($sth) ) {  % if ( defined($sth) ) {
23    
# Line 35  $sth = $result->content('sth') if $resul Line 32  $sth = $result->content('sth') if $resul
32  % while ( my @row = $sth->fetchrow_array() ) {  % while ( my @row = $sth->fetchrow_array() ) {
33  <tr>  <tr>
34  %       foreach my $v ( @row ) {  %       foreach my $v ( @row ) {
35  <td><% $v %></td>  <td><% defined($v) ? $v : 'NULL' %></td>
36  %       }  %       }
37  </tr>  </tr>
38  % }  % }
39    
40  </table>  </table>
41    
42    <%perl>
43    my $save = Jifty->web->new_action(
44            class => 'CreateQuery',
45            arguments => {
46                    sql_query => $action->form_field('sql_query'),
47                    on_database => $action->form_field('database'),
48            }
49    );
50    
51    </%perl>
52    
53    <% $save->form_field('name') %>
54    <% $save->button( label => 'Save' ) %>
55    
56  % }  % }
57    
58    <% Jifty->web->form->end() %>
59    </&>
60    

Legend:
Removed from v.10  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.26