home *** CD-ROM | disk | FTP | other *** search
- <include sesfield.hei>
- <include layout/heilay.hei>
- <include dbs.hei>
-
- <session mode="create">
- <heitmlpage title="SQL Scroll Form">
-
- <if !isdecl(se.Scroller);
- se.Scroller=null;
- /if>
-
- Now you can enter an arbitrary SQL-Query on our example database. Here are a
- few variations on the SELECT command that you might like to try:
- <p>
-
- <box>
- <FONT SIZE="-1"><b>
- <ul>
- <li> SELECT * FROM guestbook
- <li> SELECT Guest_Name FROM guestbook ORDER BY Guest_Name
- <li> SELECT DISTINCT Guest_Name, Email, Address FROM guestbook ORDER BY Guest_Name
- <li> SELECT COUNT (*) FROM guestbook
- <li> SELECT COUNT (*) FROM guestbook WHERE Country="USA"
- <li> SELECT * FROM guestbook WHERE Guest_Name LIKE 'R%'
- </ul>
- </FONT></b>
- </box>
-
- <p>
-
- Watch how the Query Result changes depending on the form of the SELECT command
- that you enter.
-
-
- /******************************************************************
- Here is the input form that allows the user to enter
- an SQL query. It is a sessionForm, displaying and updating
- session variables.
- ******************************************************************/
- <sessionForm>
- <sessionButton name="SQuery" value="Query">
- <INPUT TYPE="reset" VALUE="Reset">
- <sa href="demo.hei"> Back </sa>
- <sessionButton name="Apply">
- <br>
- <if (isempty(se.query)); se.query="SELECT * FROM guestbook"; /if>
- <sessionTextArea "Query" ROWS=6 COLS=55 wrap="physical">
- <p>
- Maximal Number of rows to read :
- <let se.max=default(se.max,100); sessionFi "max" 10 type="i"><br>
- // Number of Rows per page:
- // <let se.pgsize=default(se.pgsize,5); sessionFi "pgsize" 10 type="i">
- </sessionForm>
-
- // We do the following, when the QUERY button has been pressed
- <if !isempty(ff.Squery) && SrvDebug;
- dbsQuery se.Scroller max=se.max;
- ? se.Query;
- /dbsQuery;
- /if>
-
- <dbsScroller se.Scroller>
- <table border>
- <dbsTableHead se.Scroller>
- <dbsTableBody se.Scroller>
- </table>
- <p>
- <dbsControlLine se.Scroller>
- </dbsScroller;
-
-
- /heitmlpage;
- /session>
-
-
-
-
-
-
-
-
-
-
-
-