Prerequisites for the Templating Tutorial
This tutorial shows a few templating examples for the sample WorldDB provided by the official MySQL docs. We’ll use a simple query with two named parameters:
SELECT Name, Population
FROM Country
WHERE Population > :min AND Population < :max
If you want to follow along, download the WorldDB and insert it into a database. Then in the PocketQuery administration set up a connection to it as JDBC datasource and add our sample statement as a query:
![](../__attachments/817725595/Screenshot_2020-10-20%20PocketQuery%20Administration%20-%20Confluence(4).png?inst-v=1527abee-7a84-47e9-9034-81915ed62bd3)
Using this query, you’ll be able to display names and populations of countries. You can specify a population range you’re interested in when adding the PocketQuery macro to a page. Simply set the parameters 'min' and 'max' to your liking.
Continue with "The Default Template"