Allowing multiple choices of data observations enables people to customize views of your data and adds value to your applications. The following example utilizes our db on the career statistics of Hammerin? Hank Greenberg. The years he played are available to select from in a dropdown menu. When multiple years are selected they are passed comma delimited. Utilizing the where in statement in our sql the comma delimited selections are appended to our sql statement to display only those years selected. Because we are looking for numeric values in our where in statement no modification to the comma delimited input is necessary. When character input is involved a replace statement can be used to put the appropriate quotation marks into your statement. Which is also provided in this example, but must be un-commented to be used
Searching a data base to display hyperlinked summaries that can be clicked on to display detail data provides an excellent way to navigate through your data. The following example will search our test input db of names from our example on Database Input and Display which contains last name (lname), first name (fname) and unique id (unique_id a counter of all names as they are added to the db). The user will can search the first or last name and click on any of the results to reveal the detail data (the unique id, which is all the data we have in this db) all in the same active server page. Note: The db on the server contains data primarily created by users of CodeAve.com, as a consequence some of the data contained in the db may be questionable.
ADO is used to query the data, and the underlying database may be MySQL, SQL Server, Access, Oracle, or any other major RDBMS. Unlike many other articles, complete examples are presented, which may be copied into a file and run directly. Techniques for optimizing the output of tabular data are presented first, followed by techniques for optimizing more complex tabular data typical of reports. The appendix contains instructions for configuring the tests, links to references, and books suggestions.
When I originally wrote my online database administration pages I went for the simple approach. As a consequence, I just displayed the values of the fields as they appeared in the tables. Here's an example of how that looked:
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.