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

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

revision 25 by dpavlin, Mon Dec 4 15:15:54 2006 UTC revision 26 by dpavlin, Mon Dec 4 19:24:25 2006 UTC
# Line 5  $sql_query => undef Line 5  $sql_query => undef
5  $name => undef  $name => undef
6  $database => undef  $database => undef
7    
8    $max_rows => 100
9    
10  </%args>  </%args>
11  <%init>  <%init>
12    
# Line 64  $sth = $result->content('sth') if $resul Line 66  $sth = $result->content('sth') if $resul
66  % }  % }
67  </tr>  </tr>
68    
69    % my $rows = 0;
70  % while ( my @row = $sth->fetchrow_array() ) {  % while ( my @row = $sth->fetchrow_array() ) {
71    %       last if (++$rows > $max_rows);
72  <tr>  <tr>
73  %       foreach my $v ( @row ) {  %       foreach my $v ( @row ) {
74  <td><% defined($v) ? $v : 'NULL' %></td>  <td><% defined($v) ? $v : 'NULL' %></td>
# Line 74  $sth = $result->content('sth') if $resul Line 78  $sth = $result->content('sth') if $resul
78    
79  </table>  </table>
80    
81    % if ($sth->rows > $max_rows) {
82    <div class="note">
83    Query produced more than <% $max_rows %> rows, try adding <tt>LIMIT</tt> and
84    <tt>OFFSET</tt> to see another part of results.
85    </div>
86    % }
87    
88  % } else {  % } else {
89    
90  </div><!-- submit_button -->  </div><!-- submit_button -->

Legend:
Removed from v.25  
changed lines
  Added in v.26

  ViewVC Help
Powered by ViewVC 1.1.26