![]() |
Sergey Kornilov admin 2/27/2014 |
You need to add a WHERE clause to SQL query of those custom views. Details depend on what database do you use. |
|
jgeorgiou author 3/1/2014 |
You need to add a WHERE clause to SQL query of those custom views. Details depend on what database do you use. Here are a few examples for MySQL: http://stackoverflow.com/questions/2090221/mysql-query-to-get-all-rows-from-previous-month http://stackoverflow.com/questions/6089960/mysql-query-to-select-data-from-last-week
|
![]() |
Sergey Kornilov admin 3/1/2014 |
Lets proceed step by step. What error message each query produces? |
J
|
jackheitzer@gmail.com 3/2/2014 |
Hi all, |
|
jgeorgiou author 3/6/2014 |
Hi all, I use these lines in "list page; before sql query: (FromDate is the name of your "date field"' //Last week $week = date("W"); $strWhereClause = whereAdd($strWhereClause,"week(FromDate,1) = '". date("W")."'-1"); $strWhereClause = whereAdd($strWhereClause,"year(FromDate) = '". date("Y")."'"); // Last month $strWhereClause = whereAdd($strWhereClause,"month(FromDate) = '". date("m")."'-1"); $strWhereClause = whereAdd($strWhereClause,"year(FromDate) = '". date("Y")."'"); Works for me, Jack
|