Report-VU : fix collection selection, date selectors, csv, ...

disabled log
This commit is contained in:
Jean-Yves Gaulier
2014-10-30 18:53:22 +01:00
parent 7706d7ca10
commit 6a1e161701
14 changed files with 499 additions and 147 deletions

View File

@@ -25,11 +25,12 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
$this->params = array_merge(array(), $filter['params']);
if ($this->groupby == false) {
$this->sql ="
SELECT DISTINCT(log.id), log_search.date ddate, log_search.search, log.usrid, log.user, log.pays, log.societe, log.activite, log.fonction
$this->sql =" SELECT log.id, log_search.date ddate, log_search.search, log.usrid, log.user, log.pays, log.societe, log.activite, log.fonction
FROM log_search
INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_search.log_id)
INNER JOIN log_colls FORCE INDEX (couple) ON (log.id = log_colls.log_id) WHERE (" . $filter['sql'] .")";
INNER JOIN log FORCE INDEX (date_site) ON (log.id = log_search.log_id) AND !ISNULL(usrid)
WHERE (" . $filter['sql'] .")";
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $this->sql), FILE_APPEND);
$stmt = $this->connbas->prepare($this->sql);
$stmt->execute($this->params);
@@ -54,6 +55,8 @@ class module_report_sqlquestion extends module_report_sql implements module_repo
GROUP BY " . $this->groupby ."
ORDER BY nb DESC";
// no_file_put_contents("/tmp/report.txt", sprintf("%s (%s)\n%s\n\n", __FILE__, __LINE__, $this->sql), FILE_APPEND);
$stmt = $this->connbas->prepare($this->sql);
$stmt->execute($this->params);
$this->total_row = $stmt->rowCount();