dbi search

tk_dbisearch_init ()

  void tk_record_edit_init (&$application_object);
	

This function initialises the module.

form_dbisearch ()

This is a form function that takes arguments that define the search behaviour.

The opened source defines the table to search. There can only be one source. If fields of more than one source are sent to this function, it dies with an error message stating the problem.

There two modes of operation. If argument 'mode' is set to 'all_fields', the first element in the posted form is used to search for its occurence in all fields of the table. If it's unset or not equal to 'all_fields', a single form element contains a string that is only searched in the column specified by the field name. If there're multiple fields to search, they're ANDed, which means that a record must match all fields.

By default, form_dbisearch() ignores an empty search field when in all_fields mode. If argument 'list_all' is set all records are listed.

To display a search result tk_autoform_list_search_results() must be used.