More Complex Queries
-
I have spent a fair amount of time on the forums here, and I know where most of the answer come from… so to those that give of their free time, thank you. Do you think it would be possible for those that are using this to post working examples, rather than posting things that don’t work? I think it would be immensely useful…
I am working on a site, and while I think this plugin can provide the necessary mechanism for looping through the posts and filtering to the correct ones that match the criteria, I am having a hard time getting it to work – Basically, I have a series of conditions that must be true and if all are true display the related posts:
This seems to get the first right but not the rest –
[if field=ABCD]
[pass fields=YY,ZZ,AA,BB,CC,DD]
[loop type=sometype
field=xx compare=”>=” value={YY}
field=ab compare=”>=” value={ZZ}
field=cd compare=”like” value={AA}
]
[field title-link]
[/loop]
[/pass]This returns results where xx>=YY but stops after that comparison. SO ab>=ZZ doesn’t process.
I could use some examples of what other people have done. I have tried nesting if’s within the loop and that hasn’t helped either….
[if field=ABCD]
[pass fields=YY,ZZ,AA,BB,CC,DD]
[loop type=sometype]
[-if field=xx compare=”>=” value_2={YY}]
[–if field=ab compare=”>=” value_3={ZZ}]
[—if field=cd compare=”like” value_4={AA}]
(NOTE THAT IT SEEMED TO REQUIRE ONLY VALUE TO HAVE _# IN ORDER TO WORK??)[field title-link]
[/—if]
[/–if]
[/-if][/loop]
[/pass]
[/if]Should I be approaching this differently? I have an entire series of conditions all of which must be true in order to return a result… What am I missing? I could use some advice ??
- The topic ‘More Complex Queries’ is closed to new replies.