{field "..."} runs its parameter as a query on the application database and is replaced by the one value it answers - the first column of the first row. It is the template form of db ( "FIELD ..." ): the tag name itself becomes the command word of db(), which is why the parameter starts after the SELECT - {field "count(*) from orders"}, not {field "select count(*) ..."}.

The query runs on the database the application's $padSql* settings name (read from its .env), MySQL or SQLite. A query that finds no row answers an empty value. The parameter is SQL text as written: a value from the request does not belong in it. Fetch such a value in the page's PHP with a placeholder - db ( "FIELD name FROM users WHERE id={0}", [ $id ] ) - or write a named query in _data/name.sql, whose {$name} fields are bound as placeholders.

{field} shares its implementation with {record} and {array}; {check} is the yes-or-no variant. Do not confuse it with the field: type prefix, which reads a variable: {field:name}.

With name= the tag takes part in the designer preview: on ?page&padSample the page's _samples/page.json answers for it, so a designer can work on the template without a database.