Home arrow HTML arrow Using the Find Functions for HTML Database Forms
HTML

Using the Find Functions for HTML Database Forms


You may have any number of reasons to find a particular recordset in a database. Sometimes finding what you want is easier said than done. This article walks you through the different search functions (also known as Find functions) and shows you when you should use them. This is the seventh part of a thirteen part series that focuses on database forms with HTML.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
August 20, 2008
TABLE OF CONTENTS:
  1. · Using the Find Functions for HTML Database Forms
  2. · The ordinarySearch() function
  3. · The getTwoWords() Function
  4. · The find() Function

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Using the Find Functions for HTML Database Forms
(Page 1 of 4 )

FINDING A RECORD

Reasons for Finding a Record

You may have a recordset that is very long. Inspecting the records one row at a time can take a very long time. If you know one of the cell values of the record you are looking for, then a Find function can be written that will locate the record for you and then display it at the Input controls.

This part of the series deals with two such Find functions. The main Find function is called "Binary Search." The other function I use is called Ordinary Search. I will not explain the operation of the Binary Search function in this series. If you want to know how the function operates, consult the article I wrote for Dev Articles  titled "Binary Searching." In this series I will only show you what goes into the function and what comes out of it.

The Search Functions

The starting search function is called the find() function. The ordinary search function is called the ordinarySearch() function. The binary search function is called the binarySearch() function.

The find() function does not search the recordset. It calls the ordinarySearch() or the binarySearch() function. The ordinarySearch() function is called when the recordset is not sorted, while the binarySearch() function is called when the recordset is sorted.

It is these two functions that do the search; I will explain more about this later. There is another function associated with the find() function; this is the getTwoWords() function; again, I will cover this in more detail this later.


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials