Abstract database query construct.
SearchKey class, together with RelatedKey and SearchRelation classes, are located in the file /libraries/pj/data/SearchKey.php.
The groundwork is based on three member variables: field, value and comparator, representing one simple query condition performed on one database table. Optionally, the member variable orderBy may set the result ordering.
More SearchKey instances can be dynamically chained to a complex query using member variables andKey and orKey, which may contain further SearchKey conditions themselves and so on. Thus it is possible to construct a query of unlimited complexity, passed by just one single root SearchKey instance. Functions AddAndKey (SearchKey $key) and AddOrKey (SearchKey $key) help by creation as they care for chaining the $key on the end of the chain.
RelatedKey class enhances the SearchKey for queries on related database tables.
See SearchKey Properties, Methods and Examples for more details.
SearchKey Properties, Methods and Examples