typeattribute, and the action of the user. The whole point of using Sparse is to be able to recreate the same query using different types with only one definition, e.g. being able to both display and edit the data.
sqlfieldtags, and in addition Sparse will also select all primary keys, even if they're not displayed. They're needed to identify the rows which are edited or deleted.
SELECT e.id, e.name FROM employees AS e WHERE e.salary > 10000 AND e.country='Canada' ORDER BY e.name DESC LIMIT 10;
<h2 align="center">Employee Database</h2>
<sqltemplate type="display" database="myDB" tables="employees AS e" constraints="WHERE e.salary > 10000 AND e.country='Canada' ORDER BY e.name DESC" limit="10">
<td><sqlfield name="e.id" /></td>
<td><sqlfield name="e.name" /></td>
<sqlaction type="prev" /><sqlaction type="next" />
sqlactionedit tag has therefore been taken out). As you can see, Sparse can do pretty much anything basic SQL can do!
sqlactionbuttons, prev and next. These allow the user to cycle through the displayed results. The limit defined here is 10, but Sparse can display the first 10, the second 10, etc. You can also use sqlnavigation to print a full page-by-page list of links. Note that you can navigate the data when editing it as well as displaying it!
constraintsattribute. For example, all form data (both GET and POST) is put in the associative array $_REQUEST. So if your URL looks like this: