If the current SQL query does not include a WHERE clause, addWhere() adds it as where(condition). Otherwise, the WHERE clause is added as a new condition: and(condition).
Note: SQLQuery class methods are used in the After table initialized event.
Syntax
addWhere condition
Arguments
condition
any condition clause. Example: "id_sizes < 3 or id_sizes > 6". id_sizes is the name of the field.
Return value
No return value.
Example
Add a WHERE clause:
query.addWhere "id_sizes < 3 or id_sizes > 6"
query.addWhere "notes='" & SESSION("UserID") & "'"
query.addWhere "test ='passed'"
See also:
•Security: Additional WHERE tabs