Database Reference
In-Depth Information
wend
%>
</TABLE>
<BR>
<TABLE border=1>
<%
MyRecordSet.Close
MyRecordSet.Open “SELECT * FROM user WHERE user !='mafiu'”
while not MyRecordSet.EOF
response.write “<TR><TD>” & MyRecordSet(“Host”) & “</TD><TD>” &
MyRecordSet(“User”) & “</TD></TR>”
MyRecordSet.MoveNext
wend
%>
</TABLE>
</HTML>
The output of this code is shown in Figure 14.9. Let us examine this code briefly to see
what each part does and how it is used.
To begin, we have to tell ASP which scripting language we will be using to define our
page; this is done with the following command:
<% @LANGUAGE=”VBSCRIPT” %>
This lets the server know that we will be using VBSCRIPT within this page. All text
within the <% … %> tags is processed by ASP, all other text within the file is output as
straight HTML to the browser. Therefore we can start by setting up a basic HTML page with
the following:
Figure 14.9
ASP accessing the MySQL user table.
Search WWH ::




Custom Search