Ultradev Example Tutorial: 3.7 Create a simple query

Source: Internet
Author: User
Tags filter functions query variable
Create | tutorials Chapter III: Application database to create dynamic Web pages

section Seventh: Create a simple query

In fact, the principle of query creation is the same as the data editing principle we learned above, is to first pass a value from the first page to the second page, and then the second page according to the pass past the value of the corresponding records, and then do the corresponding processing, such as display, edit, delete. The difference is the way of delivery. In the previous section, we passed the value through an address connection, and we knew that general queries were filled out by a form and then submitted.

OK, let's take a look at the specific creation process.

First we want to create a page where the user can enter the content of the query. As shown in figure, we insert a submit button for a form field named Search that has a type of text. Note that the name of this form field is to be used after the name is taken. Then we add an execution page for this form field. Position the cursor at the Red line where the form's property panel appears. In the Action column, fill in the address of the page you want to query processing, here we use searchdo.asp to deal with. This page we are creating later. These are all set up after this page to save as search.asp, our delivery value of the first page is done.



Next we create a second page, which is searchdo.asp. As usual, open the Panel that created the recordset, as shown in figure. Do you see any different places? Yes, there is a form Variable in the filter. Let me come to the thin road. Filter to select username means that we are searching for the scope of the user name of this field. Condition column We select contain, indicating that the database will display username This field data, as long as the field contains the user input content. For example, username has the following content a, AAC,AAAC, if the user uses a search, then three data will be displayed, if users use AC search, then AAC,AAAC will be displayed. The form variable is a value that indicates that the recordset accepts delivery is passed through the table conveys. Search is our form field name, if your form field name is SearchString, the corresponding here also want to change into searchstring. Click OK and our Recordset is created.



Recordset created well, what we're going to do is just show the records in the way that we taught them.

Open the browser window to see the output of the program.



This is the SQL code generated for us by clicking the Advanced button to see Ultradev. Did you see that Request.Form ("search")? Déjà vu, huh? *_’



Dreamweaverultradev some of the basic functions are described here, after reading these, friends you should be able to do some basic data display browsing, editing the function of the deletion. Next, we talk about the Ultradev plug-in function, and then we use a simple Web site background Management program to consolidate our learning.

Why should first talk about plug-ins use it, because many times we can use plug-ins very convenient to achieve some functions, and in the next background management program also need to use some plug-ins, so we first talk about the basic use of plug-ins. Please note.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.