Filtering database results

G

Guest

I am trying to filter some database results, with partial success, but need a
little help please. If a client enters values for the four "values" i.e.

WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
correct results.

What I would like to do is, if the "type" field is left as a default value
say "any" the results display all "type" values, i.e. apartments, houses,
studios etc, and with the other filed values being met. Or if the Location
field is left default value say "any" the results display all locations i.e.
spain,france, again with the other field values being met. Taking this to the
last possible combination. If I select "beds" as value 2, and priceeuros as
maximum 200000, the results display all "types" and all "locations, but with
a "bed" value=2 and a "priceeuro">200000 being met.

I have looked at prevoius posts and the first question asked by the MVP is
show us your query so I have copied it below. Its a little beyond me this one.

Thanks for your help again.

Mick

<%
fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
'::Type::') ORDER BY PriceEuros ASC"
fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
Properties match - Please re-select</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=0
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice="SurRef"
fp_sMenuValue="SurRef
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
fp_iDisplayCols=9
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
 
S

Stefan B Rusynko

You are using ANDs
- so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
- so you need default values that will always be True if the user does not pass any

Since you have 4 conditions for user to select, presumably they are from 4 form fields
In the top of the form processing page set a default values for each query field if the field is empty
<%
If Not IsNum(Request.Form("Bed")) Then Bed=1
If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
If Not Len(Request.Form("Location"))>0 Then Location="%"
If Not Len(Request.Form("Type"))>0 Then Type="%"
%>

Or in your form set a default value which is passed if the user does not select one
Best done w/ dropdowns (w/ the default value as selected)
- for beds use: 1
- for price use say: 999999
- for Location and Type use: %


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I am trying to filter some database results, with partial success, but need a
| little help please. If a client enters values for the four "values" i.e.
|
| WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| correct results.
|
| What I would like to do is, if the "type" field is left as a default value
| say "any" the results display all "type" values, i.e. apartments, houses,
| studios etc, and with the other filed values being met. Or if the Location
| field is left default value say "any" the results display all locations i.e.
| spain,france, again with the other field values being met. Taking this to the
| last possible combination. If I select "beds" as value 2, and priceeuros as
| maximum 200000, the results display all "types" and all "locations, but with
| a "bed" value=2 and a "priceeuro">200000 being met.
|
| I have looked at prevoius posts and the first question asked by the MVP is
| show us your query so I have copied it below. Its a little beyond me this one.
|
| Thanks for your help again.
|
| Mick
|
| <%
| fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| '::Type::') ORDER BY PriceEuros ASC"
| fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| Properties match - Please re-select</td></tr>"
| fp_sDataConn="Database1"
| fp_iMaxRecords=0
| fp_iCommandType=1
| fp_iPageSize=0
| fp_fTableFormat=True
| fp_fMenuFormat=False
| fp_sMenuChoice="SurRef"
| fp_sMenuValue="SurRef"
|
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| fp_iDisplayCols=9
| fp_fCustomQuery=False
| BOTID=0
| fp_iRegion=BOTID
| %>
|
 
G

Guest

Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
two fields "Type" and "Location" as the default value, however unless I
actually select a value from the drop down lists for each of these fields, no
results. Its probably me being daft here, could you kindly take a look at the
draft page I have set up for this exercise, link below, and give me a further
clue.

http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp

Kind regards
Mick

Stefan B Rusynko said:
You are using ANDs
- so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
- so you need default values that will always be True if the user does not pass any

Since you have 4 conditions for user to select, presumably they are from 4 form fields
In the top of the form processing page set a default values for each query field if the field is empty
<%
If Not IsNum(Request.Form("Bed")) Then Bed=1
If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
If Not Len(Request.Form("Location"))>0 Then Location="%"
If Not Len(Request.Form("Type"))>0 Then Type="%"
%>

Or in your form set a default value which is passed if the user does not select one
Best done w/ dropdowns (w/ the default value as selected)
- for beds use: 1
- for price use say: 999999
- for Location and Type use: %


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


|I am trying to filter some database results, with partial success, but need a
| little help please. If a client enters values for the four "values" i.e.
|
| WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| correct results.
|
| What I would like to do is, if the "type" field is left as a default value
| say "any" the results display all "type" values, i.e. apartments, houses,
| studios etc, and with the other filed values being met. Or if the Location
| field is left default value say "any" the results display all locations i.e.
| spain,france, again with the other field values being met. Taking this to the
| last possible combination. If I select "beds" as value 2, and priceeuros as
| maximum 200000, the results display all "types" and all "locations, but with
| a "bed" value=2 and a "priceeuro">200000 being met.
|
| I have looked at prevoius posts and the first question asked by the MVP is
| show us your query so I have copied it below. Its a little beyond me this one.
|
| Thanks for your help again.
|
| Mick
|
| <%
| fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| '::Type::') ORDER BY PriceEuros ASC"
| fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| Properties match - Please re-select</td></tr>"
| fp_sDataConn="Database1"
| fp_iMaxRecords=0
| fp_iCommandType=1
| fp_iPageSize=0
| fp_fTableFormat=True
| fp_fMenuFormat=False
| fp_sMenuChoice="SurRef"
| fp_sMenuValue="SurRef"
|
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| fp_iDisplayCols=9
| fp_fCustomQuery=False
| BOTID=0
| fp_iRegion=BOTID
| %>
|
 
S

Stefan B Rusynko

I get no Results for anything I try (even selecting values)

Impossible to see any server side scripts in the browser
(they are already processed server side)
Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at

The form look generally OK
- but not too user friendly
(make the selection explanations clearer)

As for sending form results from dropdowns to a DBRW page see
http://spiderwebwoman.com/tutorials/doubledropdown.htm

PS
Change the color of your results row so it is visible
- the blue on blue is not

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| two fields "Type" and "Location" as the default value, however unless I
| actually select a value from the drop down lists for each of these fields, no
| results. Its probably me being daft here, could you kindly take a look at the
| draft page I have set up for this exercise, link below, and give me a further
| clue.
|
| http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
|
| Kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > You are using ANDs
| > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > - so you need default values that will always be True if the user does not pass any
| >
| > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > In the top of the form processing page set a default values for each query field if the field is empty
| > <%
| > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > %>
| >
| > Or in your form set a default value which is passed if the user does not select one
| > Best done w/ dropdowns (w/ the default value as selected)
| > - for beds use: 1
| > - for price use say: 999999
| > - for Location and Type use: %
| >
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > |I am trying to filter some database results, with partial success, but need a
| > | little help please. If a client enters values for the four "values" i.e.
| > |
| > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | correct results.
| > |
| > | What I would like to do is, if the "type" field is left as a default value
| > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | studios etc, and with the other filed values being met. Or if the Location
| > | field is left default value say "any" the results display all locations i.e.
| > | spain,france, again with the other field values being met. Taking this to the
| > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | maximum 200000, the results display all "types" and all "locations, but with
| > | a "bed" value=2 and a "priceeuro">200000 being met.
| > |
| > | I have looked at prevoius posts and the first question asked by the MVP is
| > | show us your query so I have copied it below. Its a little beyond me this one.
| > |
| > | Thanks for your help again.
| > |
| > | Mick
| > |
| > | <%
| > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | '::Type::') ORDER BY PriceEuros ASC"
| > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | Properties match - Please re-select</td></tr>"
| > | fp_sDataConn="Database1"
| > | fp_iMaxRecords=0
| > | fp_iCommandType=1
| > | fp_iPageSize=0
| > | fp_fTableFormat=True
| > | fp_fMenuFormat=False
| > | fp_sMenuChoice="SurRef"
| > | fp_sMenuValue="SurRef"
| > |
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | fp_iDisplayCols=9
| > | fp_fCustomQuery=False
| > | BOTID=0
| > | fp_iRegion=BOTID
| > | %>
| > |
| >
| >
| >
 
G

Guest

Hi Stefan, My problem is probably worse than I thought, anyway here we go.
I just put into the following query some random values (not selected from
the drop downs on selectaproperty2.asp but direct input into the address bar
of quickresults.asp) just as an example.

http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
and got a few expected results. So I think that bit is working ok.

I have as asked uploaded the quickresults.txt file, you can find it at
http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt

Thanks also for your comments on presentation, as soon as I can get it all
working, its my next job.
Many thanks for your help and patience
kind regards
Mick



Stefan B Rusynko said:
I get no Results for anything I try (even selecting values)

Impossible to see any server side scripts in the browser
(they are already processed server side)
Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at

The form look generally OK
- but not too user friendly
(make the selection explanations clearer)

As for sending form results from dropdowns to a DBRW page see
http://spiderwebwoman.com/tutorials/doubledropdown.htm

PS
Change the color of your results row so it is visible
- the blue on blue is not

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| two fields "Type" and "Location" as the default value, however unless I
| actually select a value from the drop down lists for each of these fields, no
| results. Its probably me being daft here, could you kindly take a look at the
| draft page I have set up for this exercise, link below, and give me a further
| clue.
|
| http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
|
| Kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > You are using ANDs
| > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > - so you need default values that will always be True if the user does not pass any
| >
| > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > In the top of the form processing page set a default values for each query field if the field is empty
| > <%
| > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > %>
| >
| > Or in your form set a default value which is passed if the user does not select one
| > Best done w/ dropdowns (w/ the default value as selected)
| > - for beds use: 1
| > - for price use say: 999999
| > - for Location and Type use: %
| >
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > |I am trying to filter some database results, with partial success, but need a
| > | little help please. If a client enters values for the four "values" i.e.
| > |
| > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | correct results.
| > |
| > | What I would like to do is, if the "type" field is left as a default value
| > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | studios etc, and with the other filed values being met. Or if the Location
| > | field is left default value say "any" the results display all locations i.e.
| > | spain,france, again with the other field values being met. Taking this to the
| > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | maximum 200000, the results display all "types" and all "locations, but with
| > | a "bed" value=2 and a "priceeuro">200000 being met.
| > |
| > | I have looked at prevoius posts and the first question asked by the MVP is
| > | show us your query so I have copied it below. Its a little beyond me this one.
| > |
| > | Thanks for your help again.
| > |
| > | Mick
| > |
| > | <%
| > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | '::Type::') ORDER BY PriceEuros ASC"
| > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | Properties match - Please re-select</td></tr>"
| > | fp_sDataConn="Database1"
| > | fp_iMaxRecords=0
| > | fp_iCommandType=1
| > | fp_iPageSize=0
| > | fp_fTableFormat=True
| > | fp_fMenuFormat=False
| > | fp_sMenuChoice="SurRef"
| > | fp_sMenuValue="SurRef"
| > |
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | fp_iDisplayCols=9
| > | fp_fCustomQuery=False
| > | BOTID=0
| > | fp_iRegion=BOTID
| > | %>
| > |
| >
| >
| >
 
G

Guest

Hi Stefan, sorry dont know if you got the post, Im not wishing to be a pest,
but we are so close I dont want to leave it now. Thanks Mick

Stefan B Rusynko said:
I get no Results for anything I try (even selecting values)

Impossible to see any server side scripts in the browser
(they are already processed server side)
Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at

The form look generally OK
- but not too user friendly
(make the selection explanations clearer)

As for sending form results from dropdowns to a DBRW page see
http://spiderwebwoman.com/tutorials/doubledropdown.htm

PS
Change the color of your results row so it is visible
- the blue on blue is not

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| two fields "Type" and "Location" as the default value, however unless I
| actually select a value from the drop down lists for each of these fields, no
| results. Its probably me being daft here, could you kindly take a look at the
| draft page I have set up for this exercise, link below, and give me a further
| clue.
|
| http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
|
| Kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > You are using ANDs
| > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > - so you need default values that will always be True if the user does not pass any
| >
| > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > In the top of the form processing page set a default values for each query field if the field is empty
| > <%
| > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > %>
| >
| > Or in your form set a default value which is passed if the user does not select one
| > Best done w/ dropdowns (w/ the default value as selected)
| > - for beds use: 1
| > - for price use say: 999999
| > - for Location and Type use: %
| >
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > |I am trying to filter some database results, with partial success, but need a
| > | little help please. If a client enters values for the four "values" i.e.
| > |
| > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | correct results.
| > |
| > | What I would like to do is, if the "type" field is left as a default value
| > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | studios etc, and with the other filed values being met. Or if the Location
| > | field is left default value say "any" the results display all locations i.e.
| > | spain,france, again with the other field values being met. Taking this to the
| > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | maximum 200000, the results display all "types" and all "locations, but with
| > | a "bed" value=2 and a "priceeuro">200000 being met.
| > |
| > | I have looked at prevoius posts and the first question asked by the MVP is
| > | show us your query so I have copied it below. Its a little beyond me this one.
| > |
| > | Thanks for your help again.
| > |
| > | Mick
| > |
| > | <%
| > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | '::Type::') ORDER BY PriceEuros ASC"
| > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | Properties match - Please re-select</td></tr>"
| > | fp_sDataConn="Database1"
| > | fp_iMaxRecords=0
| > | fp_iCommandType=1
| > | fp_iPageSize=0
| > | fp_fTableFormat=True
| > | fp_fMenuFormat=False
| > | fp_sMenuChoice="SurRef"
| > | fp_sMenuValue="SurRef"
| > |
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | fp_iDisplayCols=9
| > | fp_fCustomQuery=False
| > | BOTID=0
| > | fp_iRegion=BOTID
| > | %>
| > |
| >
| >
| >
 
S

Stefan B Rusynko

Bad Example page

Rethink your DB structure
First of all
"Type" is a reserved name in Access
- rename your DB field from Type to UnitType

Next you have a field named SurRef which includes what appears to be a unique property ID
- as in 1252
And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data using the same
property ID as part of the field data
Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
photopickup with http://www.surproperties.com/property_images/1252a.jpg

In both cases those fields should pick up the pid and image name from the SurRef field
- but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data in data
fields (a potential for errors in the future)

Any way
I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I corrected it to
hand the case when not all form fields are selected
- the example uses the field name UnitType not Type

Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass folders)

PS

IMHO
Your form price (Euros) range selections were way too numerous and random for any user to sort thru
- so I replaced it w/ a simple script for 25-550K, in increments of 25K

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| I just put into the following query some random values (not selected from
| the drop downs on selectaproperty2.asp but direct input into the address bar
| of quickresults.asp) just as an example.
|
|
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| and got a few expected results. So I think that bit is working ok.
|
| I have as asked uploaded the quickresults.txt file, you can find it at
| http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
|
| Thanks also for your comments on presentation, as soon as I can get it all
| working, its my next job.
| Many thanks for your help and patience
| kind regards
| Mick
|
|
|
| "Stefan B Rusynko" wrote:
|
| > I get no Results for anything I try (even selecting values)
| >
| > Impossible to see any server side scripts in the browser
| > (they are already processed server side)
| > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| >
| > The form look generally OK
| > - but not too user friendly
| > (make the selection explanations clearer)
| >
| > As for sending form results from dropdowns to a DBRW page see
| > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| >
| > PS
| > Change the color of your results row so it is visible
| > - the blue on blue is not
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | two fields "Type" and "Location" as the default value, however unless I
| > | actually select a value from the drop down lists for each of these fields, no
| > | results. Its probably me being daft here, could you kindly take a look at the
| > | draft page I have set up for this exercise, link below, and give me a further
| > | clue.
| > |
| > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > |
| > | Kind regards
| > | Mick
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > You are using ANDs
| > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > | > - so you need default values that will always be True if the user does not pass any
| > | >
| > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > <%
| > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > %>
| > | >
| > | > Or in your form set a default value which is passed if the user does not select one
| > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > - for beds use: 1
| > | > - for price use say: 999999
| > | > - for Location and Type use: %
| > | >
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > |I am trying to filter some database results, with partial success, but need a
| > | > | little help please. If a client enters values for the four "values" i.e.
| > | > |
| > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | correct results.
| > | > |
| > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | field is left default value say "any" the results display all locations i.e.
| > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > |
| > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > |
| > | > | Thanks for your help again.
| > | > |
| > | > | Mick
| > | > |
| > | > | <%
| > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | Properties match - Please re-select</td></tr>"
| > | > | fp_sDataConn="Database1"
| > | > | fp_iMaxRecords=0
| > | > | fp_iCommandType=1
| > | > | fp_iPageSize=0
| > | > | fp_fTableFormat=True
| > | > | fp_fMenuFormat=False
| > | > | fp_sMenuChoice="SurRef"
| > | > | fp_sMenuValue="SurRef"
| > | > |
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | fp_iDisplayCols=9
| > | > | fp_fCustomQuery=False
| > | > | BOTID=0
| > | > | fp_iRegion=BOTID
| > | > | %>
| > | > |
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
and changed for me, am I being daft again.
kind regards
Mick

Stefan B Rusynko said:
Bad Example page

Rethink your DB structure
First of all
"Type" is a reserved name in Access
- rename your DB field from Type to UnitType

Next you have a field named SurRef which includes what appears to be a unique property ID
- as in 1252
And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data using the same
property ID as part of the field data
Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
photopickup with http://www.surproperties.com/property_images/1252a.jpg

In both cases those fields should pick up the pid and image name from the SurRef field
- but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data in data
fields (a potential for errors in the future)

Any way
I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I corrected it to
hand the case when not all form fields are selected
- the example uses the field name UnitType not Type

Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass folders)

PS

IMHO
Your form price (Euros) range selections were way too numerous and random for any user to sort thru
- so I replaced it w/ a simple script for 25-550K, in increments of 25K

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| I just put into the following query some random values (not selected from
| the drop downs on selectaproperty2.asp but direct input into the address bar
| of quickresults.asp) just as an example.
|
|
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| and got a few expected results. So I think that bit is working ok.
|
| I have as asked uploaded the quickresults.txt file, you can find it at
| http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
|
| Thanks also for your comments on presentation, as soon as I can get it all
| working, its my next job.
| Many thanks for your help and patience
| kind regards
| Mick
|
|
|
| "Stefan B Rusynko" wrote:
|
| > I get no Results for anything I try (even selecting values)
| >
| > Impossible to see any server side scripts in the browser
| > (they are already processed server side)
| > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| >
| > The form look generally OK
| > - but not too user friendly
| > (make the selection explanations clearer)
| >
| > As for sending form results from dropdowns to a DBRW page see
| > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| >
| > PS
| > Change the color of your results row so it is visible
| > - the blue on blue is not
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | two fields "Type" and "Location" as the default value, however unless I
| > | actually select a value from the drop down lists for each of these fields, no
| > | results. Its probably me being daft here, could you kindly take a look at the
| > | draft page I have set up for this exercise, link below, and give me a further
| > | clue.
| > |
| > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > |
| > | Kind regards
| > | Mick
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > You are using ANDs
| > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > | > - so you need default values that will always be True if the user does not pass any
| > | >
| > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > <%
| > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > %>
| > | >
| > | > Or in your form set a default value which is passed if the user does not select one
| > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > - for beds use: 1
| > | > - for price use say: 999999
| > | > - for Location and Type use: %
| > | >
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > |I am trying to filter some database results, with partial success, but need a
| > | > | little help please. If a client enters values for the four "values" i.e.
| > | > |
| > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | correct results.
| > | > |
| > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | field is left default value say "any" the results display all locations i.e.
| > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > |
| > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > |
| > | > | Thanks for your help again.
| > | > |
| > | > | Mick
| > | > |
| > | > | <%
| > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | Properties match - Please re-select</td></tr>"
| > | > | fp_sDataConn="Database1"
| > | > | fp_iMaxRecords=0
| > | > | fp_iCommandType=1
| > | > | fp_iPageSize=0
| > | > | fp_fTableFormat=True
| > | > | fp_fMenuFormat=False
| > | > | fp_sMenuChoice="SurRef"
| > | > | fp_sMenuValue="SurRef"
| > | > |
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | fp_iDisplayCols=9
| > | > | fp_fCustomQuery=False
| > | > | BOTID=0
| > | > | fp_iRegion=BOTID
| > | > | %>
| > | > |
| > | >
| > | >
| > | >
| >
| >
| >
 
S

Stefan B Rusynko

If using Outlook Express double click the paper clip to save the zip file attachment
- the unzip it to see the page

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
| and changed for me, am I being daft again.
| kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > Bad Example page
| >
| > Rethink your DB structure
| > First of all
| > "Type" is a reserved name in Access
| > - rename your DB field from Type to UnitType
| >
| > Next you have a field named SurRef which includes what appears to be a unique property ID
| > - as in 1252
| > And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data using the
same
| > property ID as part of the field data
| > Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
| > photopickup with http://www.surproperties.com/property_images/1252a.jpg
| >
| > In both cases those fields should pick up the pid and image name from the SurRef field
| > - but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data in data
| > fields (a potential for errors in the future)
| >
| > Any way
| > I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I corrected it
to
| > hand the case when not all form fields are selected
| > - the example uses the field name UnitType not Type
| >
| > Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass folders)
| >
| > PS
| >
| > IMHO
| > Your form price (Euros) range selections were way too numerous and random for any user to sort thru
| > - so I replaced it w/ a simple script for 25-550K, in increments of 25K
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| > | I just put into the following query some random values (not selected from
| > | the drop downs on selectaproperty2.asp but direct input into the address bar
| > | of quickresults.asp) just as an example.
| > |
| > |
| >
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| > | and got a few expected results. So I think that bit is working ok.
| > |
| > | I have as asked uploaded the quickresults.txt file, you can find it at
| > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
| > |
| > | Thanks also for your comments on presentation, as soon as I can get it all
| > | working, its my next job.
| > | Many thanks for your help and patience
| > | kind regards
| > | Mick
| > |
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > I get no Results for anything I try (even selecting values)
| > | >
| > | > Impossible to see any server side scripts in the browser
| > | > (they are already processed server side)
| > | > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| > | >
| > | > The form look generally OK
| > | > - but not too user friendly
| > | > (make the selection explanations clearer)
| > | >
| > | > As for sending form results from dropdowns to a DBRW page see
| > | > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| > | >
| > | > PS
| > | > Change the color of your results row so it is visible
| > | > - the blue on blue is not
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | > | two fields "Type" and "Location" as the default value, however unless I
| > | > | actually select a value from the drop down lists for each of these fields, no
| > | > | results. Its probably me being daft here, could you kindly take a look at the
| > | > | draft page I have set up for this exercise, link below, and give me a further
| > | > | clue.
| > | > |
| > | > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > | > |
| > | > | Kind regards
| > | > | Mick
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > You are using ANDs
| > | > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > | > | > - so you need default values that will always be True if the user does not pass any
| > | > | >
| > | > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > | > <%
| > | > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > | > %>
| > | > | >
| > | > | > Or in your form set a default value which is passed if the user does not select one
| > | > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > | > - for beds use: 1
| > | > | > - for price use say: 999999
| > | > | > - for Location and Type use: %
| > | > | >
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > |I am trying to filter some database results, with partial success, but need a
| > | > | > | little help please. If a client enters values for the four "values" i.e.
| > | > | > |
| > | > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | > | correct results.
| > | > | > |
| > | > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | > | field is left default value say "any" the results display all locations i.e.
| > | > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > | > |
| > | > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > | > |
| > | > | > | Thanks for your help again.
| > | > | > |
| > | > | > | Mick
| > | > | > |
| > | > | > | <%
| > | > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | > | Properties match - Please re-select</td></tr>"
| > | > | > | fp_sDataConn="Database1"
| > | > | > | fp_iMaxRecords=0
| > | > | > | fp_iCommandType=1
| > | > | > | fp_iPageSize=0
| > | > | > | fp_fTableFormat=True
| > | > | > | fp_fMenuFormat=False
| > | > | > | fp_sMenuChoice="SurRef"
| > | > | > | fp_sMenuValue="SurRef"
| > | > | > |
| > | > | >
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | > | fp_iDisplayCols=9
| > | > | > | fp_fCustomQuery=False
| > | > | > | BOTID=0
| > | > | > | fp_iRegion=BOTID
| > | > | > | %>
| > | > | > |
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

Hi Stefan, sorry I did not get any email to my address (e-mail address removed), thats
where its going wrong, that is renowned for dumping emails with attachments.
If you would please try again, the same name but to (e-mail address removed)
perhaps that will let the Zip file through
Thanks again for your help and patience.
kind regards
Mick

Stefan B Rusynko said:
If using Outlook Express double click the paper clip to save the zip file attachment
- the unzip it to see the page

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
| and changed for me, am I being daft again.
| kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > Bad Example page
| >
| > Rethink your DB structure
| > First of all
| > "Type" is a reserved name in Access
| > - rename your DB field from Type to UnitType
| >
| > Next you have a field named SurRef which includes what appears to be a unique property ID
| > - as in 1252
| > And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data using the
same
| > property ID as part of the field data
| > Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
| > photopickup with http://www.surproperties.com/property_images/1252a.jpg
| >
| > In both cases those fields should pick up the pid and image name from the SurRef field
| > - but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data in data
| > fields (a potential for errors in the future)
| >
| > Any way
| > I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I corrected it
to
| > hand the case when not all form fields are selected
| > - the example uses the field name UnitType not Type
| >
| > Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass folders)
| >
| > PS
| >
| > IMHO
| > Your form price (Euros) range selections were way too numerous and random for any user to sort thru
| > - so I replaced it w/ a simple script for 25-550K, in increments of 25K
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| > | I just put into the following query some random values (not selected from
| > | the drop downs on selectaproperty2.asp but direct input into the address bar
| > | of quickresults.asp) just as an example.
| > |
| > |
| >
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| > | and got a few expected results. So I think that bit is working ok.
| > |
| > | I have as asked uploaded the quickresults.txt file, you can find it at
| > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
| > |
| > | Thanks also for your comments on presentation, as soon as I can get it all
| > | working, its my next job.
| > | Many thanks for your help and patience
| > | kind regards
| > | Mick
| > |
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > I get no Results for anything I try (even selecting values)
| > | >
| > | > Impossible to see any server side scripts in the browser
| > | > (they are already processed server side)
| > | > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| > | >
| > | > The form look generally OK
| > | > - but not too user friendly
| > | > (make the selection explanations clearer)
| > | >
| > | > As for sending form results from dropdowns to a DBRW page see
| > | > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| > | >
| > | > PS
| > | > Change the color of your results row so it is visible
| > | > - the blue on blue is not
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | > | two fields "Type" and "Location" as the default value, however unless I
| > | > | actually select a value from the drop down lists for each of these fields, no
| > | > | results. Its probably me being daft here, could you kindly take a look at the
| > | > | draft page I have set up for this exercise, link below, and give me a further
| > | > | clue.
| > | > |
| > | > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > | > |
| > | > | Kind regards
| > | > | Mick
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > You are using ANDs
| > | > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > | > | > - so you need default values that will always be True if the user does not pass any
| > | > | >
| > | > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > | > <%
| > | > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > | > %>
| > | > | >
| > | > | > Or in your form set a default value which is passed if the user does not select one
| > | > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > | > - for beds use: 1
| > | > | > - for price use say: 999999
| > | > | > - for Location and Type use: %
| > | > | >
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > |I am trying to filter some database results, with partial success, but need a
| > | > | > | little help please. If a client enters values for the four "values" i.e.
| > | > | > |
| > | > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | > | correct results.
| > | > | > |
| > | > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | > | field is left default value say "any" the results display all locations i.e.
| > | > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > | > |
| > | > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > | > |
| > | > | > | Thanks for your help again.
| > | > | > |
| > | > | > | Mick
| > | > | > |
| > | > | > | <%
| > | > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | > | Properties match - Please re-select</td></tr>"
| > | > | > | fp_sDataConn="Database1"
| > | > | > | fp_iMaxRecords=0
| > | > | > | fp_iCommandType=1
| > | > | > | fp_iPageSize=0
| > | > | > | fp_fTableFormat=True
| > | > | > | fp_fMenuFormat=False
| > | > | > | fp_sMenuChoice="SurRef"
| > | > | > | fp_sMenuValue="SurRef"
| > | > | > |
| > | > | >
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | > | fp_iDisplayCols=9
| > | > | > | fp_fCustomQuery=False
| > | > | > | BOTID=0
| > | > | > | fp_iRegion=BOTID
| > | > | > | %>
| > | > | > |
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
S

Stefan B Rusynko

I did not send you any emails
The attachment is in my newsgroup post above of 6/10
- the web bases interface strips all attachments

Open this newsgroup in Outlook Express by clicking the below link
news://msnews.microsoft.com/microsoft.public.frontpage.client


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, sorry I did not get any email to my address (e-mail address removed), thats
| where its going wrong, that is renowned for dumping emails with attachments.
| If you would please try again, the same name but to (e-mail address removed)
| perhaps that will let the Zip file through
| Thanks again for your help and patience.
| kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > If using Outlook Express double click the paper clip to save the zip file attachment
| > - the unzip it to see the page
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
| > | and changed for me, am I being daft again.
| > | kind regards
| > | Mick
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Bad Example page
| > | >
| > | > Rethink your DB structure
| > | > First of all
| > | > "Type" is a reserved name in Access
| > | > - rename your DB field from Type to UnitType
| > | >
| > | > Next you have a field named SurRef which includes what appears to be a unique property ID
| > | > - as in 1252
| > | > And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data using
the
| > same
| > | > property ID as part of the field data
| > | > Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
| > | > photopickup with http://www.surproperties.com/property_images/1252a.jpg
| > | >
| > | > In both cases those fields should pick up the pid and image name from the SurRef field
| > | > - but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data in
data
| > | > fields (a potential for errors in the future)
| > | >
| > | > Any way
| > | > I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I corrected
it
| > to
| > | > hand the case when not all form fields are selected
| > | > - the example uses the field name UnitType not Type
| > | >
| > | > Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass folders)
| > | >
| > | > PS
| > | >
| > | > IMHO
| > | > Your form price (Euros) range selections were way too numerous and random for any user to sort thru
| > | > - so I replaced it w/ a simple script for 25-550K, in increments of 25K
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| > | > | I just put into the following query some random values (not selected from
| > | > | the drop downs on selectaproperty2.asp but direct input into the address bar
| > | > | of quickresults.asp) just as an example.
| > | > |
| > | > |
| > | >
| >
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| > | > | and got a few expected results. So I think that bit is working ok.
| > | > |
| > | > | I have as asked uploaded the quickresults.txt file, you can find it at
| > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
| > | > |
| > | > | Thanks also for your comments on presentation, as soon as I can get it all
| > | > | working, its my next job.
| > | > | Many thanks for your help and patience
| > | > | kind regards
| > | > | Mick
| > | > |
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > I get no Results for anything I try (even selecting values)
| > | > | >
| > | > | > Impossible to see any server side scripts in the browser
| > | > | > (they are already processed server side)
| > | > | > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| > | > | >
| > | > | > The form look generally OK
| > | > | > - but not too user friendly
| > | > | > (make the selection explanations clearer)
| > | > | >
| > | > | > As for sending form results from dropdowns to a DBRW page see
| > | > | > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| > | > | >
| > | > | > PS
| > | > | > Change the color of your results row so it is visible
| > | > | > - the blue on blue is not
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | > | > | two fields "Type" and "Location" as the default value, however unless I
| > | > | > | actually select a value from the drop down lists for each of these fields, no
| > | > | > | results. Its probably me being daft here, could you kindly take a look at the
| > | > | > | draft page I have set up for this exercise, link below, and give me a further
| > | > | > | clue.
| > | > | > |
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > | > | > |
| > | > | > | Kind regards
| > | > | > | Mick
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > You are using ANDs
| > | > | > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > | > | > | > - so you need default values that will always be True if the user does not pass any
| > | > | > | >
| > | > | > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > | > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > | > | > <%
| > | > | > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > | > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > | > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > | > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > | > | > %>
| > | > | > | >
| > | > | > | > Or in your form set a default value which is passed if the user does not select one
| > | > | > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > | > | > - for beds use: 1
| > | > | > | > - for price use say: 999999
| > | > | > | > - for Location and Type use: %
| > | > | > | >
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > |I am trying to filter some database results, with partial success, but need a
| > | > | > | > | little help please. If a client enters values for the four "values" i.e.
| > | > | > | > |
| > | > | > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | > | > | correct results.
| > | > | > | > |
| > | > | > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | > | > | field is left default value say "any" the results display all locations i.e.
| > | > | > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > | > | > |
| > | > | > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > | > | > |
| > | > | > | > | Thanks for your help again.
| > | > | > | > |
| > | > | > | > | Mick
| > | > | > | > |
| > | > | > | > | <%
| > | > | > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | > | > | Properties match - Please re-select</td></tr>"
| > | > | > | > | fp_sDataConn="Database1"
| > | > | > | > | fp_iMaxRecords=0
| > | > | > | > | fp_iCommandType=1
| > | > | > | > | fp_iPageSize=0
| > | > | > | > | fp_fTableFormat=True
| > | > | > | > | fp_fMenuFormat=False
| > | > | > | > | fp_sMenuChoice="SurRef"
| > | > | > | > | fp_sMenuValue="SurRef"
| > | > | > | > |
| > | > | > | >
| > | > | >
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | > | > | fp_iDisplayCols=9
| > | > | > | > | fp_fCustomQuery=False
| > | > | > | > | BOTID=0
| > | > | > | > | fp_iRegion=BOTID
| > | > | > | > | %>
| > | > | > | > |
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

Hi Stefan, sorry for being a bit slow... Got it, and studying the code now.
Thanks for being patient, and especially for taking the time to correct the
code in my forms. Cheers.
Kind regards
Mick

Stefan B Rusynko said:
I did not send you any emails
The attachment is in my newsgroup post above of 6/10
- the web bases interface strips all attachments

Open this newsgroup in Outlook Express by clicking the below link
news://msnews.microsoft.com/microsoft.public.frontpage.client


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, sorry I did not get any email to my address (e-mail address removed), thats
| where its going wrong, that is renowned for dumping emails with attachments.
| If you would please try again, the same name but to (e-mail address removed)
| perhaps that will let the Zip file through
| Thanks again for your help and patience.
| kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > If using Outlook Express double click the paper clip to save the zip file attachment
| > - the unzip it to see the page
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
| > | and changed for me, am I being daft again.
| > | kind regards
| > | Mick
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Bad Example page
| > | >
| > | > Rethink your DB structure
| > | > First of all
| > | > "Type" is a reserved name in Access
| > | > - rename your DB field from Type to UnitType
| > | >
| > | > Next you have a field named SurRef which includes what appears to be a unique property ID
| > | > - as in 1252
| > | > And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data using
the
| > same
| > | > property ID as part of the field data
| > | > Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
| > | > photopickup with http://www.surproperties.com/property_images/1252a.jpg
| > | >
| > | > In both cases those fields should pick up the pid and image name from the SurRef field
| > | > - but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data in
data
| > | > fields (a potential for errors in the future)
| > | >
| > | > Any way
| > | > I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I corrected
it
| > to
| > | > hand the case when not all form fields are selected
| > | > - the example uses the field name UnitType not Type
| > | >
| > | > Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass folders)
| > | >
| > | > PS
| > | >
| > | > IMHO
| > | > Your form price (Euros) range selections were way too numerous and random for any user to sort thru
| > | > - so I replaced it w/ a simple script for 25-550K, in increments of 25K
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| > | > | I just put into the following query some random values (not selected from
| > | > | the drop downs on selectaproperty2.asp but direct input into the address bar
| > | > | of quickresults.asp) just as an example.
| > | > |
| > | > |
| > | >
| >
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| > | > | and got a few expected results. So I think that bit is working ok.
| > | > |
| > | > | I have as asked uploaded the quickresults.txt file, you can find it at
| > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
| > | > |
| > | > | Thanks also for your comments on presentation, as soon as I can get it all
| > | > | working, its my next job.
| > | > | Many thanks for your help and patience
| > | > | kind regards
| > | > | Mick
| > | > |
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > I get no Results for anything I try (even selecting values)
| > | > | >
| > | > | > Impossible to see any server side scripts in the browser
| > | > | > (they are already processed server side)
| > | > | > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| > | > | >
| > | > | > The form look generally OK
| > | > | > - but not too user friendly
| > | > | > (make the selection explanations clearer)
| > | > | >
| > | > | > As for sending form results from dropdowns to a DBRW page see
| > | > | > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| > | > | >
| > | > | > PS
| > | > | > Change the color of your results row so it is visible
| > | > | > - the blue on blue is not
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | > | > | two fields "Type" and "Location" as the default value, however unless I
| > | > | > | actually select a value from the drop down lists for each of these fields, no
| > | > | > | results. Its probably me being daft here, could you kindly take a look at the
| > | > | > | draft page I have set up for this exercise, link below, and give me a further
| > | > | > | clue.
| > | > | > |
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > | > | > |
| > | > | > | Kind regards
| > | > | > | Mick
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > You are using ANDs
| > | > | > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > | > | > | > - so you need default values that will always be True if the user does not pass any
| > | > | > | >
| > | > | > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > | > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > | > | > <%
| > | > | > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > | > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > | > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > | > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > | > | > %>
| > | > | > | >
| > | > | > | > Or in your form set a default value which is passed if the user does not select one
| > | > | > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > | > | > - for beds use: 1
| > | > | > | > - for price use say: 999999
| > | > | > | > - for Location and Type use: %
| > | > | > | >
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > |I am trying to filter some database results, with partial success, but need a
| > | > | > | > | little help please. If a client enters values for the four "values" i.e.
| > | > | > | > |
| > | > | > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | > | > | correct results.
| > | > | > | > |
| > | > | > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | > | > | field is left default value say "any" the results display all locations i.e.
| > | > | > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > | > | > |
| > | > | > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > | > | > |
| > | > | > | > | Thanks for your help again.
| > | > | > | > |
| > | > | > | > | Mick
| > | > | > | > |
| > | > | > | > | <%
| > | > | > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | > | > | Properties match - Please re-select</td></tr>"
| > | > | > | > | fp_sDataConn="Database1"
| > | > | > | > | fp_iMaxRecords=0
| > | > | > | > | fp_iCommandType=1
| > | > | > | > | fp_iPageSize=0
| > | > | > | > | fp_fTableFormat=True
| > | > | > | > | fp_fMenuFormat=False
| > | > | > | > | fp_sMenuChoice="SurRef"
| > | > | > | > | fp_sMenuValue="SurRef"
| > | > | > | > |
| > | > | > | >
| > | > | >
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | > | > | fp_iDisplayCols=9
| > | > | > | > | fp_fCustomQuery=False
| > | > | > | > | BOTID=0
| > | > | > | > | fp_iRegion=BOTID
| > | > | > | > | %>
| > | > | > | > |
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

Stefan, absolutely brilliant, it does just what I was attempting to do. Thank
you so much, my many hours of frustration are at an end. Thanks again for
your time and expertise.
Kind regards
Mick

Stefan B Rusynko said:
I did not send you any emails
The attachment is in my newsgroup post above of 6/10
- the web bases interface strips all attachments

Open this newsgroup in Outlook Express by clicking the below link
news://msnews.microsoft.com/microsoft.public.frontpage.client


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, sorry I did not get any email to my address (e-mail address removed), thats
| where its going wrong, that is renowned for dumping emails with attachments.
| If you would please try again, the same name but to (e-mail address removed)
| perhaps that will let the Zip file through
| Thanks again for your help and patience.
| kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > If using Outlook Express double click the paper clip to save the zip file attachment
| > - the unzip it to see the page
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
| > | and changed for me, am I being daft again.
| > | kind regards
| > | Mick
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Bad Example page
| > | >
| > | > Rethink your DB structure
| > | > First of all
| > | > "Type" is a reserved name in Access
| > | > - rename your DB field from Type to UnitType
| > | >
| > | > Next you have a field named SurRef which includes what appears to be a unique property ID
| > | > - as in 1252
| > | > And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data using
the
| > same
| > | > property ID as part of the field data
| > | > Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
| > | > photopickup with http://www.surproperties.com/property_images/1252a.jpg
| > | >
| > | > In both cases those fields should pick up the pid and image name from the SurRef field
| > | > - but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data in
data
| > | > fields (a potential for errors in the future)
| > | >
| > | > Any way
| > | > I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I corrected
it
| > to
| > | > hand the case when not all form fields are selected
| > | > - the example uses the field name UnitType not Type
| > | >
| > | > Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass folders)
| > | >
| > | > PS
| > | >
| > | > IMHO
| > | > Your form price (Euros) range selections were way too numerous and random for any user to sort thru
| > | > - so I replaced it w/ a simple script for 25-550K, in increments of 25K
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| > | > | I just put into the following query some random values (not selected from
| > | > | the drop downs on selectaproperty2.asp but direct input into the address bar
| > | > | of quickresults.asp) just as an example.
| > | > |
| > | > |
| > | >
| >
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| > | > | and got a few expected results. So I think that bit is working ok.
| > | > |
| > | > | I have as asked uploaded the quickresults.txt file, you can find it at
| > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
| > | > |
| > | > | Thanks also for your comments on presentation, as soon as I can get it all
| > | > | working, its my next job.
| > | > | Many thanks for your help and patience
| > | > | kind regards
| > | > | Mick
| > | > |
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > I get no Results for anything I try (even selecting values)
| > | > | >
| > | > | > Impossible to see any server side scripts in the browser
| > | > | > (they are already processed server side)
| > | > | > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| > | > | >
| > | > | > The form look generally OK
| > | > | > - but not too user friendly
| > | > | > (make the selection explanations clearer)
| > | > | >
| > | > | > As for sending form results from dropdowns to a DBRW page see
| > | > | > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| > | > | >
| > | > | > PS
| > | > | > Change the color of your results row so it is visible
| > | > | > - the blue on blue is not
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | > | > | two fields "Type" and "Location" as the default value, however unless I
| > | > | > | actually select a value from the drop down lists for each of these fields, no
| > | > | > | results. Its probably me being daft here, could you kindly take a look at the
| > | > | > | draft page I have set up for this exercise, link below, and give me a further
| > | > | > | clue.
| > | > | > |
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > | > | > |
| > | > | > | Kind regards
| > | > | > | Mick
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > You are using ANDs
| > | > | > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > | > | > | > - so you need default values that will always be True if the user does not pass any
| > | > | > | >
| > | > | > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > | > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > | > | > <%
| > | > | > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > | > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > | > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > | > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > | > | > %>
| > | > | > | >
| > | > | > | > Or in your form set a default value which is passed if the user does not select one
| > | > | > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > | > | > - for beds use: 1
| > | > | > | > - for price use say: 999999
| > | > | > | > - for Location and Type use: %
| > | > | > | >
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > |I am trying to filter some database results, with partial success, but need a
| > | > | > | > | little help please. If a client enters values for the four "values" i.e.
| > | > | > | > |
| > | > | > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | > | > | correct results.
| > | > | > | > |
| > | > | > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | > | > | field is left default value say "any" the results display all locations i.e.
| > | > | > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > | > | > |
| > | > | > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > | > | > |
| > | > | > | > | Thanks for your help again.
| > | > | > | > |
| > | > | > | > | Mick
| > | > | > | > |
| > | > | > | > | <%
| > | > | > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | > | > | Properties match - Please re-select</td></tr>"
| > | > | > | > | fp_sDataConn="Database1"
| > | > | > | > | fp_iMaxRecords=0
| > | > | > | > | fp_iCommandType=1
| > | > | > | > | fp_iPageSize=0
| > | > | > | > | fp_fTableFormat=True
| > | > | > | > | fp_fMenuFormat=False
| > | > | > | > | fp_sMenuChoice="SurRef"
| > | > | > | > | fp_sMenuValue="SurRef"
| > | > | > | > |
| > | > | > | >
| > | > | >
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | > | > | fp_iDisplayCols=9
| > | > | > | > | fp_fCustomQuery=False
| > | > | > | > | BOTID=0
| > | > | > | > | fp_iRegion=BOTID
| > | > | > | > | %>
| > | > | > | > |
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

Stefan, absolutely brilliant, cant thank you enough. Kind regards
Mick

Stefan B Rusynko said:
I did not send you any emails
The attachment is in my newsgroup post above of 6/10
- the web bases interface strips all attachments

Open this newsgroup in Outlook Express by clicking the below link
news://msnews.microsoft.com/microsoft.public.frontpage.client


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Hi Stefan, sorry I did not get any email to my address (e-mail address removed), thats
| where its going wrong, that is renowned for dumping emails with attachments.
| If you would please try again, the same name but to (e-mail address removed)
| perhaps that will let the Zip file through
| Thanks again for your help and patience.
| kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > If using Outlook Express double click the paper clip to save the zip file attachment
| > - the unzip it to see the page
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
| > | and changed for me, am I being daft again.
| > | kind regards
| > | Mick
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Bad Example page
| > | >
| > | > Rethink your DB structure
| > | > First of all
| > | > "Type" is a reserved name in Access
| > | > - rename your DB field from Type to UnitType
| > | >
| > | > Next you have a field named SurRef which includes what appears to be a unique property ID
| > | > - as in 1252
| > | > And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data using
the
| > same
| > | > property ID as part of the field data
| > | > Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
| > | > photopickup with http://www.surproperties.com/property_images/1252a.jpg
| > | >
| > | > In both cases those fields should pick up the pid and image name from the SurRef field
| > | > - but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data in
data
| > | > fields (a potential for errors in the future)
| > | >
| > | > Any way
| > | > I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I corrected
it
| > to
| > | > hand the case when not all form fields are selected
| > | > - the example uses the field name UnitType not Type
| > | >
| > | > Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass folders)
| > | >
| > | > PS
| > | >
| > | > IMHO
| > | > Your form price (Euros) range selections were way too numerous and random for any user to sort thru
| > | > - so I replaced it w/ a simple script for 25-550K, in increments of 25K
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| > | > | I just put into the following query some random values (not selected from
| > | > | the drop downs on selectaproperty2.asp but direct input into the address bar
| > | > | of quickresults.asp) just as an example.
| > | > |
| > | > |
| > | >
| >
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| > | > | and got a few expected results. So I think that bit is working ok.
| > | > |
| > | > | I have as asked uploaded the quickresults.txt file, you can find it at
| > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
| > | > |
| > | > | Thanks also for your comments on presentation, as soon as I can get it all
| > | > | working, its my next job.
| > | > | Many thanks for your help and patience
| > | > | kind regards
| > | > | Mick
| > | > |
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > I get no Results for anything I try (even selecting values)
| > | > | >
| > | > | > Impossible to see any server side scripts in the browser
| > | > | > (they are already processed server side)
| > | > | > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| > | > | >
| > | > | > The form look generally OK
| > | > | > - but not too user friendly
| > | > | > (make the selection explanations clearer)
| > | > | >
| > | > | > As for sending form results from dropdowns to a DBRW page see
| > | > | > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| > | > | >
| > | > | > PS
| > | > | > Change the color of your results row so it is visible
| > | > | > - the blue on blue is not
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | > | > | two fields "Type" and "Location" as the default value, however unless I
| > | > | > | actually select a value from the drop down lists for each of these fields, no
| > | > | > | results. Its probably me being daft here, could you kindly take a look at the
| > | > | > | draft page I have set up for this exercise, link below, and give me a further
| > | > | > | clue.
| > | > | > |
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > | > | > |
| > | > | > | Kind regards
| > | > | > | Mick
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > You are using ANDs
| > | > | > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield anything
| > | > | > | > - so you need default values that will always be True if the user does not pass any
| > | > | > | >
| > | > | > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > | > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > | > | > <%
| > | > | > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > | > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > | > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > | > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > | > | > %>
| > | > | > | >
| > | > | > | > Or in your form set a default value which is passed if the user does not select one
| > | > | > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > | > | > - for beds use: 1
| > | > | > | > - for price use say: 999999
| > | > | > | > - for Location and Type use: %
| > | > | > | >
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > |I am trying to filter some database results, with partial success, but need a
| > | > | > | > | little help please. If a client enters values for the four "values" i.e.
| > | > | > | > |
| > | > | > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | > | > | correct results.
| > | > | > | > |
| > | > | > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | > | > | field is left default value say "any" the results display all locations i.e.
| > | > | > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > | > | > |
| > | > | > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > | > | > |
| > | > | > | > | Thanks for your help again.
| > | > | > | > |
| > | > | > | > | Mick
| > | > | > | > |
| > | > | > | > | <%
| > | > | > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | > | > | Properties match - Please re-select</td></tr>"
| > | > | > | > | fp_sDataConn="Database1"
| > | > | > | > | fp_iMaxRecords=0
| > | > | > | > | fp_iCommandType=1
| > | > | > | > | fp_iPageSize=0
| > | > | > | > | fp_fTableFormat=True
| > | > | > | > | fp_fMenuFormat=False
| > | > | > | > | fp_sMenuChoice="SurRef"
| > | > | > | > | fp_sMenuValue="SurRef"
| > | > | > | > |
| > | > | > | >
| > | > | >
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | > | > | fp_iDisplayCols=9
| > | > | > | > | fp_fCustomQuery=False
| > | > | > | > | BOTID=0
| > | > | > | > | fp_iRegion=BOTID
| > | > | > | > | %>
| > | > | > | > |
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
S

Stefan B Rusynko

You're welcome
- you should find enough info in the sample to understand how it was don it w/ the DBRW

But IMHO
A project of the nature you have is not suited for using the DBRW
- the DBRW uses over 300 lines of code to do what could be hand coded in ASP in less than 50 lines
- you will never be able to handle any reservations w/ the DBRW and your search results will always be too broad
- your DB structure will eventually become unmaintainable

Start learning Classic ASP (and drop the DBRW) at say
http://www.w3schools.com/asp/default.asp
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, absolutely brilliant, cant thank you enough. Kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > I did not send you any emails
| > The attachment is in my newsgroup post above of 6/10
| > - the web bases interface strips all attachments
| >
| > Open this newsgroup in Outlook Express by clicking the below link
| > news://msnews.microsoft.com/microsoft.public.frontpage.client
| >
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Hi Stefan, sorry I did not get any email to my address (e-mail address removed), thats
| > | where its going wrong, that is renowned for dumping emails with attachments.
| > | If you would please try again, the same name but to (e-mail address removed)
| > | perhaps that will let the Zip file through
| > | Thanks again for your help and patience.
| > | kind regards
| > | Mick
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > If using Outlook Express double click the paper clip to save the zip file attachment
| > | > - the unzip it to see the page
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
| > | > | and changed for me, am I being daft again.
| > | > | kind regards
| > | > | Mick
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > Bad Example page
| > | > | >
| > | > | > Rethink your DB structure
| > | > | > First of all
| > | > | > "Type" is a reserved name in Access
| > | > | > - rename your DB field from Type to UnitType
| > | > | >
| > | > | > Next you have a field named SurRef which includes what appears to be a unique property ID
| > | > | > - as in 1252
| > | > | > And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data
using
| > the
| > | > same
| > | > | > property ID as part of the field data
| > | > | > Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
| > | > | > photopickup with http://www.surproperties.com/property_images/1252a.jpg
| > | > | >
| > | > | > In both cases those fields should pick up the pid and image name from the SurRef field
| > | > | > - but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data
in
| > data
| > | > | > fields (a potential for errors in the future)
| > | > | >
| > | > | > Any way
| > | > | > I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I
corrected
| > it
| > | > to
| > | > | > hand the case when not all form fields are selected
| > | > | > - the example uses the field name UnitType not Type
| > | > | >
| > | > | > Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass
folders)
| > | > | >
| > | > | > PS
| > | > | >
| > | > | > IMHO
| > | > | > Your form price (Euros) range selections were way too numerous and random for any user to sort thru
| > | > | > - so I replaced it w/ a simple script for 25-550K, in increments of 25K
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| > | > | > | I just put into the following query some random values (not selected from
| > | > | > | the drop downs on selectaproperty2.asp but direct input into the address bar
| > | > | > | of quickresults.asp) just as an example.
| > | > | > |
| > | > | > |
| > | > | >
| > | >
| >
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| > | > | > | and got a few expected results. So I think that bit is working ok.
| > | > | > |
| > | > | > | I have as asked uploaded the quickresults.txt file, you can find it at
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
| > | > | > |
| > | > | > | Thanks also for your comments on presentation, as soon as I can get it all
| > | > | > | working, its my next job.
| > | > | > | Many thanks for your help and patience
| > | > | > | kind regards
| > | > | > | Mick
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > I get no Results for anything I try (even selecting values)
| > | > | > | >
| > | > | > | > Impossible to see any server side scripts in the browser
| > | > | > | > (they are already processed server side)
| > | > | > | > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| > | > | > | >
| > | > | > | > The form look generally OK
| > | > | > | > - but not too user friendly
| > | > | > | > (make the selection explanations clearer)
| > | > | > | >
| > | > | > | > As for sending form results from dropdowns to a DBRW page see
| > | > | > | > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| > | > | > | >
| > | > | > | > PS
| > | > | > | > Change the color of your results row so it is visible
| > | > | > | > - the blue on blue is not
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | > | > | > | two fields "Type" and "Location" as the default value, however unless I
| > | > | > | > | actually select a value from the drop down lists for each of these fields, no
| > | > | > | > | results. Its probably me being daft here, could you kindly take a look at the
| > | > | > | > | draft page I have set up for this exercise, link below, and give me a further
| > | > | > | > | clue.
| > | > | > | > |
| > | > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > | > | > | > |
| > | > | > | > | Kind regards
| > | > | > | > | Mick
| > | > | > | > |
| > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > |
| > | > | > | > | > You are using ANDs
| > | > | > | > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield
anything
| > | > | > | > | > - so you need default values that will always be True if the user does not pass any
| > | > | > | > | >
| > | > | > | > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > | > | > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > | > | > | > <%
| > | > | > | > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > | > | > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > | > | > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > | > | > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > | > | > | > %>
| > | > | > | > | >
| > | > | > | > | > Or in your form set a default value which is passed if the user does not select one
| > | > | > | > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > | > | > | > - for beds use: 1
| > | > | > | > | > - for price use say: 999999
| > | > | > | > | > - for Location and Type use: %
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > --
| > | > | > | > | >
| > | > | > | > | > _____________________________________________
| > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > | > | > _____________________________________________
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > |I am trying to filter some database results, with partial success, but need a
| > | > | > | > | > | little help please. If a client enters values for the four "values" i.e.
| > | > | > | > | > |
| > | > | > | > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | > | > | > | correct results.
| > | > | > | > | > |
| > | > | > | > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | > | > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | > | > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | > | > | > | field is left default value say "any" the results display all locations i.e.
| > | > | > | > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | > | > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | > | > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | > | > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > | > | > | > |
| > | > | > | > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | > | > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > | > | > | > |
| > | > | > | > | > | Thanks for your help again.
| > | > | > | > | > |
| > | > | > | > | > | Mick
| > | > | > | > | > |
| > | > | > | > | > | <%
| > | > | > | > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | > | > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | > | > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | > | > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | > | > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | > | > | > | Properties match - Please re-select</td></tr>"
| > | > | > | > | > | fp_sDataConn="Database1"
| > | > | > | > | > | fp_iMaxRecords=0
| > | > | > | > | > | fp_iCommandType=1
| > | > | > | > | > | fp_iPageSize=0
| > | > | > | > | > | fp_fTableFormat=True
| > | > | > | > | > | fp_fMenuFormat=False
| > | > | > | > | > | fp_sMenuChoice="SurRef"
| > | > | > | > | > | fp_sMenuValue="SurRef"
| > | > | > | > | > |
| > | > | > | > | >
| > | > | > | >
| > | > | >
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | > | > | > | fp_iDisplayCols=9
| > | > | > | > | > | fp_fCustomQuery=False
| > | > | > | > | > | BOTID=0
| > | > | > | > | > | fp_iRegion=BOTID
| > | > | > | > | > | %>
| > | > | > | > | > |
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 
G

Guest

Thanks for the advice on ongoing development, I do beleive its about there
now (with your help! lol) So as its working fine, I think I will just leave
it alone. I now with your help also understand the functionality of the "%"
and "Like" operators within asp Thanks Again Mick

Stefan B Rusynko said:
You're welcome
- you should find enough info in the sample to understand how it was don it w/ the DBRW

But IMHO
A project of the nature you have is not suited for using the DBRW
- the DBRW uses over 300 lines of code to do what could be hand coded in ASP in less than 50 lines
- you will never be able to handle any reservations w/ the DBRW and your search results will always be too broad
- your DB structure will eventually become unmaintainable

Start learning Classic ASP (and drop the DBRW) at say
http://www.w3schools.com/asp/default.asp
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Stefan, absolutely brilliant, cant thank you enough. Kind regards
| Mick
|
| "Stefan B Rusynko" wrote:
|
| > I did not send you any emails
| > The attachment is in my newsgroup post above of 6/10
| > - the web bases interface strips all attachments
| >
| > Open this newsgroup in Outlook Express by clicking the below link
| > news://msnews.microsoft.com/microsoft.public.frontpage.client
| >
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Hi Stefan, sorry I did not get any email to my address (e-mail address removed), thats
| > | where its going wrong, that is renowned for dumping emails with attachments.
| > | If you would please try again, the same name but to (e-mail address removed)
| > | perhaps that will let the Zip file through
| > | Thanks again for your help and patience.
| > | kind regards
| > | Mick
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > If using Outlook Express double click the paper clip to save the zip file attachment
| > | > - the unzip it to see the page
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Stefan, thanks it makes sense, thankyou. I cant see the new file you helped
| > | > | and changed for me, am I being daft again.
| > | > | kind regards
| > | > | Mick
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > Bad Example page
| > | > | >
| > | > | > Rethink your DB structure
| > | > | > First of all
| > | > | > "Type" is a reserved name in Access
| > | > | > - rename your DB field from Type to UnitType
| > | > | >
| > | > | > Next you have a field named SurRef which includes what appears to be a unique property ID
| > | > | > - as in 1252
| > | > | > And then you have at least 2 other fields (hyperlink fields) which have will require you to maintain duplicate data
using
| > the
| > | > same
| > | > | > property ID as part of the field data
| > | > | > Photo1 with http://www.surproperties.com/asp/property-details_clear_blue_web.asp?pid=1252
| > | > | > photopickup with http://www.surproperties.com/property_images/1252a.jpg
| > | > | >
| > | > | > In both cases those fields should pick up the pid and image name from the SurRef field
| > | > | > - but unless you learn to hand code your ASP you are limited to the constraints of the DRW which means redundant data
in
| > data
| > | > | > fields (a potential for errors in the future)
| > | > | >
| > | > | > Any way
| > | > | > I did look at your code and w/i the "constraints" of the DBRW (plus some hand coded ASP to do it all in 1 page), I
corrected
| > it
| > | > to
| > | > | > hand the case when not all form fields are selected
| > | > | > - the example uses the field name UnitType not Type
| > | > | >
| > | > | > Unzip and Try the attached page in your web (File import it into top level folder - same as the fpdb and _fpclass
folders)
| > | > | >
| > | > | > PS
| > | > | >
| > | > | > IMHO
| > | > | > Your form price (Euros) range selections were way too numerous and random for any user to sort thru
| > | > | > - so I replaced it w/ a simple script for 25-550K, in increments of 25K
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Hi Stefan, My problem is probably worse than I thought, anyway here we go.
| > | > | > | I just put into the following query some random values (not selected from
| > | > | > | the drop downs on selectaproperty2.asp but direct input into the address bar
| > | > | > | of quickresults.asp) just as an example.
| > | > | > |
| > | > | > |
| > | > | >
| > | >
| >
http://new.surproperties.com/_datab...caleta&type=apartment&bed=2&priceeuros=300000
| > | > | > | and got a few expected results. So I think that bit is working ok.
| > | > | > |
| > | > | > | I have as asked uploaded the quickresults.txt file, you can find it at
| > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.txt
| > | > | > |
| > | > | > | Thanks also for your comments on presentation, as soon as I can get it all
| > | > | > | working, its my next job.
| > | > | > | Many thanks for your help and patience
| > | > | > | kind regards
| > | > | > | Mick
| > | > | > |
| > | > | > |
| > | > | > |
| > | > | > | "Stefan B Rusynko" wrote:
| > | > | > |
| > | > | > | > I get no Results for anything I try (even selecting values)
| > | > | > | >
| > | > | > | > Impossible to see any server side scripts in the browser
| > | > | > | > (they are already processed server side)
| > | > | > | > Make a copy of your results page and rename it to quickresults.txt so the asp code is visible to look at
| > | > | > | >
| > | > | > | > The form look generally OK
| > | > | > | > - but not too user friendly
| > | > | > | > (make the selection explanations clearer)
| > | > | > | >
| > | > | > | > As for sending form results from dropdowns to a DBRW page see
| > | > | > | > http://spiderwebwoman.com/tutorials/doubledropdown.htm
| > | > | > | >
| > | > | > | > PS
| > | > | > | > Change the color of your results row so it is visible
| > | > | > | > - the blue on blue is not
| > | > | > | >
| > | > | > | > --
| > | > | > | >
| > | > | > | > _____________________________________________
| > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > | > _____________________________________________
| > | > | > | >
| > | > | > | >
| > | > | > | > | Hi Stefan, many thanks, but Im not quite there yet. I selected "%" for the
| > | > | > | > | two fields "Type" and "Location" as the default value, however unless I
| > | > | > | > | actually select a value from the drop down lists for each of these fields, no
| > | > | > | > | results. Its probably me being daft here, could you kindly take a look at the
| > | > | > | > | draft page I have set up for this exercise, link below, and give me a further
| > | > | > | > | clue.
| > | > | > | > |
| > | > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/selectaproperty2.asp and the form posts to
| > | > | > | > | http://new.surproperties.com/_database1_interface/clients/editor/quickresults.asp
| > | > | > | > |
| > | > | > | > | Kind regards
| > | > | > | > | Mick
| > | > | > | > |
| > | > | > | > | "Stefan B Rusynko" wrote:
| > | > | > | > |
| > | > | > | > | > You are using ANDs
| > | > | > | > | > - so both (or in your case all 4) conditions must be True (yield a matching result) for the query to yield
anything
| > | > | > | > | > - so you need default values that will always be True if the user does not pass any
| > | > | > | > | >
| > | > | > | > | > Since you have 4 conditions for user to select, presumably they are from 4 form fields
| > | > | > | > | > In the top of the form processing page set a default values for each query field if the field is empty
| > | > | > | > | > <%
| > | > | > | > | > If Not IsNum(Request.Form("Bed")) Then Bed=1
| > | > | > | > | > If Not IsNum(Request.Form("PriceEuros")) Then PriceEuros=999999
| > | > | > | > | > If Not Len(Request.Form("Location"))>0 Then Location="%"
| > | > | > | > | > If Not Len(Request.Form("Type"))>0 Then Type="%"
| > | > | > | > | > %>
| > | > | > | > | >
| > | > | > | > | > Or in your form set a default value which is passed if the user does not select one
| > | > | > | > | > Best done w/ dropdowns (w/ the default value as selected)
| > | > | > | > | > - for beds use: 1
| > | > | > | > | > - for price use say: 999999
| > | > | > | > | > - for Location and Type use: %
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > --
| > | > | > | > | >
| > | > | > | > | > _____________________________________________
| > | > | > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | > | > | > http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > | > | > _____________________________________________
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | > |I am trying to filter some database results, with partial success, but need a
| > | > | > | > | > | little help please. If a client enters values for the four "values" i.e.
| > | > | > | > | > |
| > | > | > | > | > | WHERE bed=2&price=200000&location=Spain&Type=apartment good news up come the
| > | > | > | > | > | correct results.
| > | > | > | > | > |
| > | > | > | > | > | What I would like to do is, if the "type" field is left as a default value
| > | > | > | > | > | say "any" the results display all "type" values, i.e. apartments, houses,
| > | > | > | > | > | studios etc, and with the other filed values being met. Or if the Location
| > | > | > | > | > | field is left default value say "any" the results display all locations i.e.
| > | > | > | > | > | spain,france, again with the other field values being met. Taking this to the
| > | > | > | > | > | last possible combination. If I select "beds" as value 2, and priceeuros as
| > | > | > | > | > | maximum 200000, the results display all "types" and all "locations, but with
| > | > | > | > | > | a "bed" value=2 and a "priceeuro">200000 being met.
| > | > | > | > | > |
| > | > | > | > | > | I have looked at prevoius posts and the first question asked by the MVP is
| > | > | > | > | > | show us your query so I have copied it below. Its a little beyond me this one.
| > | > | > | > | > |
| > | > | > | > | > | Thanks for your help again.
| > | > | > | > | > |
| > | > | > | > | > | Mick
| > | > | > | > | > |
| > | > | > | > | > | <%
| > | > | > | > | > | fp_sQry="SELECT * FROM property_current WHERE (Bed >= ::Bed:: AND
| > | > | > | > | > | PriceEuros <= ::priceEuros:: AND Location = '::Location::' AND Type =
| > | > | > | > | > | '::Type::') ORDER BY PriceEuros ASC"
| > | > | > | > | > | fp_sDefault="Bed=Bedrooms&PriceEuros=&Location=&Type="
| > | > | > | > | > | fp_sNoRecords="<tr><td colspan=9 align=""LEFT"" width=""100%"">Sorry - No
| > | > | > | > | > | Properties match - Please re-select</td></tr>"
| > | > | > | > | > | fp_sDataConn="Database1"
| > | > | > | > | > | fp_iMaxRecords=0
| > | > | > | > | > | fp_iCommandType=1
| > | > | > | > | > | fp_iPageSize=0
| > | > | > | > | > | fp_fTableFormat=True
| > | > | > | > | > | fp_fMenuFormat=False
| > | > | > | > | > | fp_sMenuChoice="SurRef"
| > | > | > | > | > | fp_sMenuValue="SurRef"
| > | > | > | > | > |
| > | > | > | > | >
| > | > | > | >
| > | > | >
| > | >
| >
fp_sColTypes="&Expr1000=3&Datebookedon=135&SurRef=202&Complex=202&Type=202&Location=202&Bed=2&Bath=3&Furnished=202&Description=203&PriceEuros=3&PricePounds=3&Photo1=203&Photo=203&photopickup=203&IncludeSur=11&IncludeClear=11&ID=3&"
| > | > | > | > | > | fp_iDisplayCols=9
| > | > | > | > | > | fp_fCustomQuery=False
| > | > | > | > | > | BOTID=0
| > | > | > | > | > | fp_iRegion=BOTID
| > | > | > | > | > | %>
| > | > | > | > | > |
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | > | >
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top