Tuesday, April 8, 2008

Filtering in module DatabasePublisher

If you are using the module DatabasePublisher in Dynamicweb CMS, it is possibel to make dynamic filtering of data. The syntax is based around 3 querystring params.

Take this example: filterName=myCol&filterCondition=>=&filterValue=12

filterName = The name of the column
filterCondition = The condition to use (normal <, >, =, like...)
filterValue = The value to use in the filter.

The above example would make DatabasePublisher generate a where statement:
"where myCol>=12"

You may repeat a column more than once! If for instance you wish the value to be greater that 12 but less than 25:
filterName=myCol&filterCondition=>=&filterValue=12&filterName=myCol&filterCondition=<&filterValue=25

No comments: