Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
Hi.
In term.php the query prepared to find Terms uses table name without prefix to specify fields. As elsewhere the method getDatabaseTableName() should be used.
Best wishes.
I don't find a query build in /model/Term.php.
Could you point out line number ?
Actually it's just the where clause
$where = '1=1';
if ($idProject) $where .= ' AND term.idProject = '.$idProject;
if ($periodType) {
$start=date('Y-m-d');
$end=date('Y-m-d');
if ($periodType=='year') {
$start=$paramYear . '-01-01';
$end=$paramYear . '-12-31';
} else if ($periodType=='month') {
$start=$paramYear . '-' . (($paramMonth<10)?'0':'') . $paramMonth . '-01';
$end=$paramYear . '-' . (($paramMonth= '" . $start . "'";
$where.=" and term.date getDatabaseTableName();
$where = '1=1';
if ($idProject)
$where .= " AND ".$termAlias . ".idProject = " . $idProject;
if ($periodType) {
$start = date('Y-m-d');
$end = date('Y-m-d');
if ($periodType == 'year') {
$start = $paramYear . '-01-01';
$end = $paramYear . '-12-31';
} else if ($periodType == 'month') {
$start = $paramYear . '-' . (($paramMonth < 10) ? '0' : '') . $paramMonth . '-01';
$end = $paramYear . '-' . (($paramMonth firstDayofWeek($paramWeek, $paramYear));
$end = GlbCalendar::istanza()->addDaysToDate($start, 6);
}
$where.=" AND ( ".$termAlias . ".date >= '" . $start . "'";
$where.=" and ". $termAlias . ".date getSqlElementsFromCriteria(null, false, $where);
OK !
So it's not in /modle/Term.php but in /report/term.php, I was not looking at the right file.
Thanks for your fix.
It will be included in next patch / version.