Creating Table With Simple SQL File
In this chapter we will make the
orders2.mql
file and fill it up with a few simple methods.
We will also add the table in the demo menu in the web application.
On this page:
Referencing Different Table
Referencing different table is achieved with
FROM
method which overloads the default table name (in this case the default table name would be nonexistent
orders2
):
<%method FROM>orders<%method>
Linking Table To Permissions
The
FUNZIONE
method is used together with the
public.funzione.nome
to select the right set of permissions which are used during the authorization process.
<%method FUNZIONE>Orders</%method>
This time the only difference from the previous example is that we can reference the table using the
FUNZIONE
method:
Notice the permission settings. The
DemoAdmin
user has
Delete, Insert, Select
and
Update
permissions to edit the table. The
DemoGuest
has only
Select
permission to view the table.
Notice additional detail - the
frame.html
uses
Ver
parameter which is useful for preventing browser cache the frame when it is changed.
frame.html
has other parameters but they are intended to be used only for special cases (for example for testing). It is recommended to add the parameters into the
.mql
files.
Adding Descriptions
Let's also add
FIELDS_DESCRIPTION
for the
orders
table:
<%method DESCRIPTION>Orders from bakery shop cashier's registry.</%method>
<%method FIELDS_DESCR>Price, Commission ID, Employee ID</%method>
With all settings in place the Orders(2) menu displays: