Code for searching a mysql database on multiple terms inputed from an html form



I am designing a database with several "key word" columns. Users
wanting to search the database will enter terms into html form fields
from drop down menus populated from existing lookup tables or by adding
their own terms which may, in some cases, be inserted into the lookup
tables for subsequent users. Some of the form fields may be left
empty.

I want to create a query that will include all terms entered into a
field in the form, search the "key word" columns for those terms and
return the IDs of records that have those key words in their "key word"
columns.

I haven't started doing this, though I can see it will raise issues
like vlidating data, what to do with empty form fields, and turning the
form data into a proper SQL query. I can see using the SQL function
IN() and a bunch of ORs.

Does anyone know where I can find some procedural code (preferable) or
an object class to help me do this?

Thanks.

--Kenoli

Kenoli Oleari
Neighborhood Assemblies Network
kenoli@xxxxxxxxx
510-601-8217
http://www.sfnan.org
http://www.horizonsofchange.com

.



Relevant Pages

  • Re: Code for searching a mysql database on multiple terms inputed from an html form
    ... Here's some code for searching for barcode labels: ... Some of the form fields may be left ... return the IDs of records that have those key words in their "key word" ... form data into a proper SQL query. ...
    (alt.php)
  • Re: Database Wizard P*****G me off
    ... Microsoft Office FrontPage ... > In the SQL language, which the DRW uses to perform database operations, as ... Syntax error in UPDATE statement. ... >> One or more form fields were empty. ...
    (microsoft.public.frontpage.programming)
  • Re: Insert txt files into a form?
    ... I figured out a way to set up the data in word using form fields from my ... but each entry sets up on it's own "page." ... I am using a database program to maintain research articles records. ... word wher ethe form fields are lined up as a bibliography. ...
    (microsoft.public.word.docmanagement)
  • Re: Locking form
    ... you could have the data from your form fields ... uploaded to a database, ... >> original plus the pdf. ... >> This message is posted to a newsgroup. ...
    (microsoft.public.word.vba.general)
  • re: Multi page forms
    ... Personal info on first page, ... Save all the submitted form fields in Session ... Copy this information into the database only when the ... Microsoft FrontPage MVP ...
    (microsoft.public.frontpage.client)