Sagar Hebra

Greenhorn
+ Follow
since Nov 09, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sagar Hebra

Let me try this -

If I understand correctly what you have is -
Rules and conditions, Filter can have combination of multiple rules and conditions.

I would suggest to have two tables with one-to-many relationship. Parent stores the rule id and for each rule you have one or more records in child table.

rule1 - url contains blah1
rule2 - hits greater than 500
rule3 - url contains blah2 and hits greater than 1000

Now if user selects two rules, rule1 and rule 3 then building of the query from the returned LIST should have below logic

for different rule id keep on adding OR i.e. (url contains blah2 AND hits greater than 1000) OR url contains blah1

I may be completely wrong to understand your scenario...