set_query_filter($WHERE)

  • Parameters:
    • $WHERE: Sql WHERE statement to select data conditionally (DO NOT include WHERE keyword).
  • Description:
    • The query filter is essentially the WHERE clause without the WHERE. The method adds WHERE condition to already 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.
  • Remark:
    • DO NOT include keyword “WHERE” the filter. phpGrid automatically adds WHERE to the query.
    • Use only SINGLE QUOTE around the filtered value.
  • Example:
1
$dg -> set_query_filter("status='Shipped' AND YEAR(shippedDate) = 2003");

No related content found.

Tags: