THE META-HTML LANGUAGE REFERENCE MANUAL

[TOC]

Manual Page Viewer

Name: SQL::STANDARD-SEARCH-HANDLER

Section: Generic Sql Interface


Synopsis:

    <sql::standard-search-handler PACKAGE &key [FSIZE] [HREF]

Description:

    Perform a database search on the search table using the criteria in PACKAGE. Variables in PACKAGE must include:

    1. csf-search (simply must be set)
    2. csf-column (the name of the column to search on)
    3. csf-operator (either "LIKE" "NOT LIKE" or "=")
    4. csf-value (the text to search for)

    Produces a table with the contents of the specified column linked with an href to sql::search-defurl?.

    You can overide the information which is displayed for each record that matches the search criteria by creating a function called sql::search-result-name. If this function exists, it should take two arguments: the column name that was being searched for, and an association list representing the data of the current record.

    An example might be to always display the last and first name of any search where the column name to be searched contained the string "name":

     <defun sql::search-result-name col alist>
       <if <match <get-var-once col> "name" caseless=true>
           <concat <alist-get-var alist last_name>
                   ", "
                   <alist-get-var alist first_name>>
         <alist-get-var alist <get-var-once col>>>
     </defun>
     

Edit Pointer
Function Index
Variable Index
Variable Editor


The META-HTML Reference Manual V2.0 Copyright © 1995, 1998, Brian J. Fox
Found a bug? Send mail to bug-manual@metahtml.org