Click to See Complete Forum and Search --> : dwmx search help


boder
01-23-2003, 05:31 PM
I'm trying to create a search in dwmx of my access database and finding it... next to impossible.

I want three variables, price, bedrooms, and bathrooms, each numerical.

Anybody know how to do this within DWMX? (I am really right off the turnip truck, do not know sql better than I do Urdu and html only a littlle better, so I'm trying to work within dw as much as possible.)

Thanks!

PS: I know how to create a seach page with search form and a results page that needs an sql statement, but what that statement should be for 3 variables and how to find out, that's where I get in way over my head.

boder
01-24-2003, 09:08 AM
Hey, I'm not ruling out any help I can get. DWMX does allow/help me write an SQL and I've wound up with something like this below, which, since it doesn't work, must not be right, but maybe you can nudge me along? (I realize you guys who know how to do it the RIGHT way must get tired of us dw newbies; for what it's worth, I'm trying to pick up some basics as I go.)

SELECT *
FROM Listings
WHERE price 'MMColParam' AND bedroom 'prcBed' AND bathroom 'prcBath' = 'prcBed'
ORDER BY price ASC

In my search forms I have statements like "BETWEEN 1 AND 2000000" for price and "BETWEEN 1 AND 10" for bathrooms.

DWMX also has me set up variables such as "MMColParam" default value "1" and run-time value "Request.Form("prcPrice")

Many thanks for any help I can get!

boder
01-24-2003, 04:26 PM
Thanks. I think I'm getting it, but I want my SQL to accept values from my search page, right?

As written it looks like it would just search out, well, every house, since they all fit on those paramters. Don't I have to put a variable of some sort in the SQL that will accept a form element?

thanks again,
b

tasneem
01-25-2003, 01:56 PM
Hi
I am no expert, but I thought the end of line, if you need to seperate your code in lines for readability, you would use :
& _
is that right or wrong?