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.
Hy,
I need to a private report to extract a list of table records 'work' for a given week.
I use the following script:
$where='idProject in '. $projectList;
$where.=' and idResource = '. $user->id;
$where.=' and week = '. $periodValue;
$work = new Work();
$workList = $work->getSqlElementsFromCriteria(null, false, $where);
foreach ($workList as $work) { ...
The result is a list containing one row per day, like this sql command :
select * from work where idProject = ............
But my need is :
select distinct (field 1, filed 2, .. ) from work where idProject = ......
How can I do ?
Thanks in advance.
Armel
What you need is a "group by" query.
ProjeQtOr persistence framework does not take these queries into account.
You have to build it by your own and use the Sql::query() to execute it.
Thanks,
I've find an other issu : i just transform my "$workList" with php function array_unique .
It's running.
You can close the topics.