Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > SQLQuery class

About SQLQuery class

Scroll Prev Next More

 

SQLQuery class allows you to modify the current SQL query stored in the $query object. The $query object is available only in the After table initialized event.

 

All the methods described below should be used in the After table initialized event. This ensures that the changes made are applied to all pages.

Methods

Method

Description

addWhere()

Adds a WHERE clause to the current SQL query.

replaceWhere()

Replaces the WHERE clause of the current SQL query.

addField()

Adds a field name to the end of the SELECT clause of the current SQL query.

deleteField()

Removes a field name from the SELECT clause of the current SQL query.

replaceField()

Replaces a field name in the SELECT clause of the current SQL query with a new one.

See also:

Database API:Query()

Event: BeforeQuery<PageName>

Event: ListQuery

Dynamic SQL query

About SQL query screen

SQL tab

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software