Show row count for custom SQL queries

This commit is contained in:
Simon Willison 2017-11-19 07:54:50 -08:00
commit f59c840e7d
No known key found for this signature in database
GPG key ID: FBB38AFE227189DB

View file

@ -44,11 +44,8 @@
<p><input type="submit" value="Run SQL"></p>
</form>
{% if truncated %}
<div style="padding: 1em; margin: 1em 0; border: 3px solid red;">These results were truncated. You will need to apply OFFSET/LIMIT to see the whole result set.</div>
{% endif %}
{% if rows %}
<p>Returned {% if truncated %}more than {% endif %}{{ "{:,}".format(rows|length) }} row{% if rows|length == 1 %}{% else %}s{% endif %}</p>
<table>
<thead>
<tr>