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

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 / 3
August 20, 2008
  1. · Using the Find Functions for HTML Database Forms
  2. · The ordinarySearch() function
  3. · The getTwoWords() Function
  4. · The find() Function

print this article

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


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

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


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