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.
i can't execute this request with sqlElement :dry:
SELECT count(distinct `idResource`,`workDate`)FROM `work` WHERE `week`=201248
Not really ANSI SQL compliant.
Try
select count(*) from (SELECT distinct `idResource`,`workDate` FROM `work` WHERE `week`=201247) as ww
this is my code
$Ressource=SqlList::getList('Resource');
foreach($Ressource as $keyresource => $valresource)
{
$crit=array('week'=>$y.''.$week);
$obj=new Work();
$Jours=$obj->countSqlElementsFromCriteria($crit);
}
So i should modify the file sqlElement.php.
But i try this way w and i can't create a new function to generate a request to reply this need.
Sure this code
$Ressource=SqlList::getList('Resource');
foreach($Ressource as $keyresource => $valresource)
{
$crit=array('week'=>$y.''.$week);
$obj=new Work();
$Jours=$obj->countSqlElementsFromCriteria($crit);
}
will not generate
SELECT count(distinct `idResource`,`workDate`)FROM `work` WHERE `week`=201248
unless you changed SqlElement code (I stongly recommand against this !).
It will more likely generate
select count(*) as cpt from work where week='201248'
Maybe if you describe what you try to get (and not how you try to get it), answers may be more helpfull. 😉