|
Chapter
1 - Answers
- When would
you use Check boxes over Option/Radio Buttons?
You
would use Checkboxes when you want to create a logical AND between choices
instead of a logical OR. i.e. This option and that option vs. This option
or that option.
- Do you
need a submit button?
You do
if you want the data entered in the form to be transmitted to the server
for processing.
- Where
does the data entered in the FORM go?
The
data entered into the FORM goes to the web server for processing, in
specific the data will be delivered to the MIVA Script file specified
in the ACTION attribute of the FORM tag.
Chapter
2 - Answers
- True or
False. Variables in MIVA are strongly typed.
- True or
False. You can declare a number of variables all at once.
- The <MVASSIGN>
tag is used to declare variables.
- Create
an if structure that will make sure the value of the p variable is greater
than or equal to 99, and if so set the variable total equal to the value
of p variable.
<MVIF
EXPR=”{ p GE 99 }”>
<MVASSIGN
NAME=”total” VALUE=”{ p }”>
</MVIF>
- Create
a function that will multiply two numbers together and return the result.
<MVFUNCTION
NAME="MultiplyTwoNumbers" PARAMETERS
= " argument1, argument2">
<MVFUNCTIONRETURN
VALUE="{ argument1 * argument2 }">
</MVFUNCTION>
Chapter
3 - Answers
- Why must
you set the MAILHOST attribute of the <MVSMTP> tag set?
Yes,
if you want it to send the email.
- (True
/ False) You specify your client mail server for the MAILHOST value?
- Where
does the body of your message go?
In-between
the opening and closing MVSMTP tags
- Can you
write a MIVA application that will send two e-mails when it executes.
Yes,
just have two sets of MVSMTP tags.
Chapter
4 - Answers
- The <MVIMPORT>
tag set work as loop. (true / false)
- The <MVIMPORTSTOP>
tag will stop the writing of data to the file. (true / false)
- Why would
you use <MVIMPORTSTOP>?
You may only want to display 5 items from the file and then stop.
- What
would be a good use of the FILTER attribute of the <MVIMPORT>
tag set?
To
pick certain lines from the file, i.e. all the items that are red.
Chapter
5 - Answers
- The <MVCREATE>
tag only creates the Xbase3 database. It does not establish a connection
to the database. (true/false)
- What
is the advantage of using the MEMO field?
It
is good for data that may not have a specific size.
- MEMO
field’s data is treated as other fields’ data type and is stored as
part of the database. (true/false)
MEMO
fields are stored in a separate file with the extension .dbt.
- The <MVOPEN>
tag is used to open a connection to a new database and assign it a name
that can be used to refer to the connection. (true/false)
- The <MVFIND>
tag requires an index file in order to find data in a database. (true/false)
- What are
the two tags required to delete a record from a database?
<MVDELETE>
and <MVPACK>
- Does
the <MVSKIP> tag require an index file?
No
MVSKIP does not require an index.
- The <MVINDEX>
tag is used to create an index file for a database. (true/false)
Chapter
6 - Answers
- The <MVOPENVIEW>
tag can be thought of as a table held in the memory of the web server
that contains the result of your SQL command. (true/false)
- Does the
<MVQUERY> tag return any result like <MVOPENVIEW> tag?
No,
MVQUERY does not return any results.
- <MVQUERY
NAME=”test_db” QUERY=”{insert_str}”>. Is this is a valid Miva tag?
If so, explain it.
Yes,
it will pass the command contained in the variable insert_str to the
database called test_db.
- The <MVOPEN>
tag is used to open a connection to an existing database and assign
it a name that can be used to refer to this connection. (true/false)
- What is
the functionality of the <MVCLOSEVIEW> tag?
By
closing the view you are releasing the memory back to the web server.
This is very good programming practice, and every view opened should
be closed.
- What is
the difference between the QUERY attribute within the <MVOPENVIEW>
tag and the <MVQUERY> tag
The
MVOPENVIEW tag issues a QUERY that will return data into the view. The
MVQUERY tag is used to send a database command to the database, like
an insert, update or delete but NOT a SELECT.
|