- $WHERE: Sql WHERE statement to select data conditionally (DO NOT include WHERE keyword).
The query filter is essentially the WHERE clause without the WHERE. The method adds WHERE condition an existing Sql SELECT statement. Use this method if you have WHERE clause in your SQL statement. You should use the same SQL syntax, such as single quotes around non-numeric values, and even SQL functions.
- DO NOT include keyword “WHERE” the filter. phpGrid automatically adds WHERE to the query.
- Use only SINGLE QUOTE around the filtered value.
$dg -> set_query_filter("status='Shipped' AND YEAR(shippedDate) = 2003");