Hello,
I'm trying to sometime like the following
But I'm not sure if this is proper syntax. Can anyone let me know how to accomplish this. Assuming of course that this method won't work.
All help is appreciated
Thanks
I'm trying to sometime like the following
Code:
$query = "Select COUNT(*) as CLTOTAL, ProviderName as PNAME, b.ProviderCode as PCODE " .
"from checklist a, providerdetail b " .
"where (a.ProviderCode=b.ProviderCode)" .
switch ($userTypeID)
{
case 1:
" AND (a.Clerk = $clerkID)" .
break;
case 2:
" AND (a.Clerk = $clerkID) OR (a.BranchID = $branch)" .
break;
case 3:
" AND ((a.Clerk = $clerkID) OR " . in_array($branch, $branchList); . " " .
break;
case 9:
" AND (b.Active = 1)" .
break;
default:
" AND (a.Clerk = $clerkID) " .
}
" GROUP BY PCODE, PNAME " .
" ORDER BY PNAME";
But I'm not sure if this is proper syntax. Can anyone let me know how to accomplish this. Assuming of course that this method won't work.
All help is appreciated
Thanks