Databases Reference
In-Depth Information
The next section you create provides a list of all the pages, along with links to the pages. To create this navigation
section, follow these steps:
1.
Go to the
Home
page.
2.
Click the
New Section
link.
3.
Select
Navigation
for
Section Type
, and click
Next
.
4.
Select
Page Navigation
for
Navigation Type
, and click
Next
.
5.
If you want to, modify
Title
and set
Sequence
to
1
, and then click the
Create Section
button.
The new section should look like Figure
12-21
.
Figure 12-21.
Page navigation
SQL Tags
Websheets allow administrators and contributors to query tables and views in the schema. They can create reports
that are similar to data grids, except they're read-only. They can also include query results called
SQL tags
directly
in sections.
On the Players page, let's add a section to display the number of registered users who have access to the
application, and include a SQL tag in the section. To create the section, follow these steps:
1.
Go to the
Players
page.
2.
Click the
New Section
link.
3.
Select
Text
for
Section Type
, and click
Next
.
4.
Set
Sequence
to
5
and
Title
to
Active Registered Users
.
5.
Enter the following text in the
Content
section, and click the
Create Section
button:
We currently have[[sqlvalue: select count(*) from tusers where active_flag = 'Y'
]]active registered users. They are: [[sql: select initcap(user_name) "Name"
from tusers order by user_name ]]
The new section should look like Figure
12-22
. Notice the
select count
query in the first line of the preceding
code. That query generates the value 3 shown as the number of active users in the figure. Similarly, the second
select
statement in the preceding code generates the list of player names.