Filter Using DropDown

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
xela05
User
Posts: 1

Filter Using DropDown

Post by xela05 »

Hello,

I've a table where I list the years from 1989 to 2050.
Then I've another table where I identify projects, in witch one of the fields is the year.

Is there a way to make a view or a report that works dynamically based on a year chosen from a drop down linked to the year table? Like a filter lets say....

Thanks


arbei
User
Posts: 9384

Post by arbei »

You may use Recordset_Selecting server event to modify the filter (passed to the event as argument). See the topic Server Events and Client Scripts in the help file.


andyrav
User
Posts: 641

Post by andyrav »

Hi
do you know why this will not filer the drop down?

$rs = Execute("SELECT * FROM customers where type = 1 ");
if ($rs && $rs -> RecordCount() > 0) {
$sFilter = "";
while (!$rs -> EOF) {
$sFilter.= " CustomerID = '".$rs->fields("id").
"' OR";
$rs -> MoveNext();
}
$sFilter = rtrim($sFilter, "OR");
AddFilter($filter, $sFilter);
$rs -> Close();
}

many thanks


mobhar
User
Posts: 11727

Post by mobhar »

Because there are no MoveNext() and Close() anymore. Use moveNext() and close() instead.


Post Reply