main.tpl 654 B

123456789101112131415161718192021222324252627
  1. {% extends "layout.tpl" %}
  2. {% block content %}
  3. <form method="POST">
  4. <textarea name='sql' rows=10 style='width: 90%'>{{ sql }}</textarea><br/>
  5. <input type='submit' value='Run..'>
  6. </form>
  7. {% if rowCount %}
  8. <div class='alert alert-info' role="alert">
  9. Row Count Affected: {{ rowCount }}
  10. </div>
  11. {% endif %}
  12. <table style="width: 100%" border="1">
  13. <tr>
  14. {% for column in columns %}
  15. <th> {{ column }} </th>
  16. {% endfor %}
  17. </tr>
  18. {% for row in rows %}
  19. <tr>
  20. {% for column in columns %}
  21. <td> {{ row[column] }} </td>
  22. {% endfor %}
  23. </tr>
  24. {% endfor %}
  25. </table>
  26. {% endblock %}