Download Informix Web DataBlade Module Application Developer`s Guide

Transcript
Using System Variables to Format the SQL Results
Variable
When Set?
Description
MI_ERRORMSG
On error
Error message returned from the SQL statement. For more
information on handling errors, see “MIERROR Tag” on
page 6-29.
MI_ROWCOUNT
After execution
Number of rows retrieved in the SQL statement. Updated
after processing is complete.
MI_SQL
On execution
SQL statement executed.
(2 of 2)
The following /select4.html AppPage displays the number of rows returned
by the last query executed:
<HTML>
<HEAD><TITLE>Simple Select 4</TITLE></HEAD>
<BODY>
<TABLE BORDER>
<?MISQL SQL="select * from staff;">
<TR> {<TD> $* </TD>} </TR>
<?/MISQL>
</TABLE>
<HR>
<B>This query retrieved:</B>
<?MIVAR> $MI_ROWCOUNT <?/MIVAR> <B> rows </B>
</BODY>
</HTML>
The following illustration shows sample Web browser output.
Web Browser - [Simple Select 4]
URL: http://domain:port/hr_app/?MIval=/select4.html
John
Somebody Senior Consultant
Joe
Average
Consultant
Mark
Markup
Software Development Engineer
Figure 6-4
Simple Select 4
This query retrieved: 3 rows
Using Tags in AppPages 6-11