Class db_search

Description

DB Search class This class inherits the functionality of the generic 'search' class. It extends it to implement a database search.

Located in /dbsearch-defs.php (line 41)

search
   |
   --db_search
Variable Summary
 mixed $searchquery
Method Summary
 db_search db_search ([string $title = "Search Results"], [mixed $searchquery = false])
 void execute ()
 void fieldlist ([string $field_spec = "*"])
 void from (string $table_spec)
 void limit (string $limit)
 void orderby ([string $field_spec = ""])
 void set_searchquery ([mixed $query = false])
 void where (string $where_clause)
Variables
Methods
Constructor db_search (line 56)

Constructor

The constructor. Usually the query will be built separately and added via set_searchquery(), but we also allow a ready-made query object to be passed in here. This object should be a valid dbquery() object as returned by the likes of dbselect() (see query-defs.php).

db_search db_search ([string $title = "Search Results"], [mixed $searchquery = false])
  • string $title: Title describing this search
  • mixed $searchquery: Either a dbselect() object, or false
execute (line 129)

Execute the search Execute the database query search and store any hits.

void execute ()
fieldlist (line 121)

Define search fields list

void fieldlist ([string $field_spec = "*"])
  • string $field_spec: A list of fields separated by commas.
from (line 85)

Define search table FROM list

void from (string $table_spec)
  • string $table_spec: The table list to add to the query
limit (line 112)

Define search LIMIT clause

void limit (string $limit)
  • string $limit: A numeric value. Do not include the word "LIMIT".
orderby (line 103)

Define search ORDER BY clause

void orderby ([string $field_spec = ""])
  • string $field_spec: The ORDER BY field list, without the words "ORDER BY".
set_searchquery (line 73)

Define the search query object

The query object will usually be an executed dbselect() object

void set_searchquery ([mixed $query = false])
  • mixed $query: The dbselect() object to use for searching
where (line 94)

Define search WHERE clause

void where (string $where_clause)
  • string $where_clause: The WHERE clause, without the word "WHERE".

Inherited Methods

Inherited From search

 search::search()
 search::clear_daterange()
 search::clear_search()
 search::does_not_match()
 search::has_daterange()
 search::hitcount()
 search::initialise()
 search::match()
 search::may_match()
 search::must_match()
 search::reset_search()
 search::set_daterange()
 search::set_maxresults()
 search::set_skipresults()
 search::termcount()

Documentation generated by phpDocumentor 1.3.0RC3