Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZQuery Class Reference

## Public Member Functions
| __construct ( $fields, $queryText, $single_string=false)
| buildQuery ()
| isLiteral ()
| partialCompare ()
| setIsLiteral ( $literal)
| setPartialCompare ( $partial)
| setStopWordColumn ( $value)
| setStopWordPercent ( $value)

## Public Attributes
| $Fields
| $QueryText
| $IsLiteral
| $PartialCompare
| $StopWordColumn
| $StopPercent
| $SingleString
| $Literal

## Detailed Description

! eZLink The eZQuery class builds SQL queries.

En klasse som h�ndterer SQL queries. Lager query setninger fra tekststrenger.

Example code

// create a new query and search in the columns Topic and Body
$query = new eZQuery( array( "Topic", "Body" ), $query );
// create a select
$query_str = "SELECT ID FROM MyTable WHERE (" .
$query->buildQuery() .
") ORDER BY SomeColumn LIMIT $offset, $limit";
// do the query
$db->array_query( $message_array, $query_str );
eZQuery
Definition: ezquery.php:54
$query
if(isset( $Year) &&!is_numeric( $Year)||isset( $Month) &&!is_numeric( $Month)) $query
Definition: entryexitpages.php:65
$db
$db
Definition: ezarticle/user/authorlist.php:53

See also
  eZDB

Definition at line 53 of file ezquery.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZQuery::__construct | ( |  | $fields,
|  |  | $queryText,
|  |  | $single_string = `false`
| ) |  |

Initializes the query with the fields and the query text. The query text can be supplied as a string or as an array. If the query text is a string it will be split using spaces as a delimiter. If $single_string is true and $queryText is a string the string will not be split up. $fields is an array of strings which is used for matching against, it can also be a single string in which case it is converted to an array with one element.

Definition at line 63 of file ezquery.php.

## Member Function Documentation

## ◆ buildQuery()

eZQuery::buildQuery | ( |  | ) |

Builds the WHERE clause of an SQL sentence and returns it.

Definition at line 79 of file ezquery.php.

References $i, $j, $query, and $QueryText.

## ◆ isLiteral()

eZQuery::isLiteral | ( |  | ) |

Returns whether the query is literal or not. If it is literal all query items will match as they are.

Definition at line 217 of file ezquery.php.

References $Literal.

## ◆ partialCompare()

eZQuery::partialCompare | ( |  | ) |

Returns whether the query will do a partial compare or not.

Definition at line 225 of file ezquery.php.

References $PartialCompare.

## ◆ setIsLiteral()

eZQuery::setIsLiteral | ( |  | $literal | ) |

Sets whether the query is literal or not.

Definition at line 233 of file ezquery.php.

## ◆ setPartialCompare()

eZQuery::setPartialCompare | ( |  | $partial | ) |

Sets whether the query does a partial compare or not.

Definition at line 241 of file ezquery.php.

## ◆ setStopWordColumn()

eZQuery::setStopWordColumn | ( |  | $value | ) |

Sets the Stop Word frequency colums; E.g: eZArticle_Word.Frequency

Definition at line 250 of file ezquery.php.

## ◆ setStopWordPercent()

eZQuery::setStopWordPercent | ( |  | $value | ) |

Sets the Stop Word percent E.g: 0.5 == 50%

Definition at line 259 of file ezquery.php.

## Member Data Documentation

## ◆ $Fields

eZQuery::$Fields

Definition at line 264 of file ezquery.php.

## ◆ $IsLiteral

eZQuery::$IsLiteral

Definition at line 266 of file ezquery.php.

## ◆ $Literal

eZQuery::$Literal

Definition at line 273 of file ezquery.php.

Referenced by isLiteral().

## ◆ $PartialCompare

eZQuery::$PartialCompare

Definition at line 267 of file ezquery.php.

Referenced by partialCompare().

## ◆ $QueryText

eZQuery::$QueryText

Definition at line 265 of file ezquery.php.

Referenced by buildQuery().

## ◆ $SingleString

eZQuery::$SingleString

Definition at line 272 of file ezquery.php.

## ◆ $StopPercent

eZQuery::$StopPercent

Definition at line 270 of file ezquery.php.

## ◆ $StopWordColumn

eZQuery::$StopWordColumn

Definition at line 269 of file ezquery.php.

The documentation for this class was generated from the following file:

- ezquery.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.