Multi-Select Query

42 views
Skip to first unread message

Nicole Persram

unread,
Dec 12, 2011, 12:09:33 PM12/12/11
to PHRETS
I've got a system running RETS through the PHRETS system. I have a
form, that runs through a query to pull out results, and we're adding
in multi-select boxes.

So far, my code looks like this for the query: (SUB_AREA_NAME=|
AreaA,AreaB,AreaC,AreaD) This works for allowing many results to come
up. Problem is this:

For some reason, the system is doing an 'and' operation instead of an
'or' operation. So anytime we search up more then one place, if any of
the results come up empty, they will all come up empty.

For example:

Lets say AreaA has 3 houses. AreaB has 0 houses, AreaC has 10 houses,
and AreaD has 1 house.

If you look up: AreaA + AreaC you will get 13 results.
AreaA + AreaC + AreaD you will get 14 results.
AreaD by itself you will get 1 result.

AreaA + AreaB you will get 0 results.
AreaA + AreaB + AreaC + AreaD you will get 0 results.

Basically, because AreaB has no results, if you query that area with
any other area that does have results, it will still come up as no
results.

I need to know how to query multiple selections from one category,
while showing all the results even if one area doesn't have any.

Thanks.

Al

unread,
Dec 13, 2011, 9:20:40 AM12/13/11
to PHRETS

Nicole Persram

unread,
Dec 15, 2011, 12:40:21 PM12/15/11
to PHRETS
I read through this discussion, the difference with theirs is that the
multiple things they are querying are separate sections (ex.
rets_photo_timestamp and sys_Last_Modified) whereas with mine, they're
all for the different values in the same section (sub_area_name). I
can't split up this section and go (SUB_AREA_NAME=| AreaA)
(SUB_AREA_NAME=| AreaB), etc. because the system won't let me do that.

On Dec 13, 8:20 am, Al <here2h...@gmail.com> wrote:
> Check this post, i believe that will helphttp://groups.google.com/group/phrets/browse_thread/thread/df554b5e61...

Nicole Persram

unread,
Jan 23, 2012, 1:48:33 PM1/23/12
to PHRETS
Does anyone else have any suggestions for me?

shailesh....@gmail.com

unread,
Jan 24, 2012, 2:45:09 AM1/24/12
to PHRETS
Try These One
(SUB_AREA_NAME=| AreaA) ,(SUB_AREA_NAME=| AreaB),(SUB_AREA_NAME=|
AreaC)
Reply all
Reply to author
Forward
0 new messages