HZetzer
|
Posted: 02/04/2002, 11:06 AM |
|
I would like to GROUP BY defined fields with a WHERE for a passed parameter. I do not wish for the passed parameter to be apart of the GROUP BY. Any help would be appriecated.
|
|
|
Nicole
|
Posted: 02/05/2002, 2:24 AM |
|
Hello,
try the following approach:
create custom sql on SQL tab using any field values in WHERE clause and add necessary fields to GROUP BY clause. Never mind what values you use here. During design time custom sql is executed in order to select field names to be displayed on the form.
But while site works on the server the temporary values are to be replaced with real ones. To do it duplicate sql query in Open event, e.g.:
PHP
if (get_param("name") != "")
$sSQL = "select name, count(*) from table_name where name like '%". get_param("name")."%' group by name";
|
|
|
|