Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners

DB2 PHP Generator online Help

Prev Return to chapter overview Next

Filter

To reduce the number of records available at the page, specify the Filter condition. This condition corresponds to the WHERE clause of the query returned page data (you must not add the WHERE keyword to beginning of the condition).

 

Example 1

There is a table with test questions of a Web programming course. To display only questions of the 'Beginner' level (level_id = 2) concerning to PHP (statement_language_id = 1), set the filter condition as follows:

 

 

 

Example 2

You can use subqueries in the filter expression. For example, to display the list of channels that hosted even if a single game, specify the Filter condition as follows:

 

(channel.id > 0) AND channel.id IN 

(

  SELECT game.channel_id 

  FROM game

)



Prev Return to chapter overview Next