HighDots Forums  

Dynamic operator used in a search/results page

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Dynamic operator used in a search/results page in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Elliott
 
Posts: n/a

Default Dynamic operator used in a search/results page - 07-14-2003 , 06:00 AM






Hi,
I have a search results page running where I want the user to filter the
results based on a date expression, they can select GREATER THAN, LESS THAN
or EQUAL TO from a drop down list (where the values are '>','<' and '=') and
then enter the year in a seperate text field next to the list. The user then
submits the search and the list of results are then displayed on the
following page.

What would be the best way to get this to work? I already have a recordset
on the results page to compare other field entries with the database items
(such as model type, description and colour). Since the recordset requires
me to use an operator, I don't know how to get dreamweaver to recognise the
dynamic operator parameter as the operator to use in the recordset!

Any ideas??

P.S Since the date is just the year, eg 1995, it does not need to be set as
a date field, it can be set to a number or text field.

Thanks

Tom



Reply With Quote
  #2  
Old   
Julian Roberts
 
Posts: n/a

Default Re: Dynamic operator used in a search/results page - 07-14-2003 , 06:40 AM






It'd work in the same way as your search. ie. You'd have SQL like

select * from t where d mmcolparam1 mmcolparam2

so, the mmcolparam1 would be replaced by the dynamic operator.

--

Jules
http://www.charon.co.uk

Charon Cart 3
http://www.charon.co.uk/charoncart

ICQ 51328805



Elliott wrote:
Quote:
Hi,
I have a search results page running where I want the user to filter
the results based on a date expression, they can select GREATER THAN,
LESS THAN or EQUAL TO from a drop down list (where the values are
'>','<' and '=') and then enter the year in a seperate text field
next to the list. The user then submits the search and the list of
results are then displayed on the following page.

What would be the best way to get this to work? I already have a
recordset on the results page to compare other field entries with the
database items (such as model type, description and colour). Since
the recordset requires me to use an operator, I don't know how to get
dreamweaver to recognise the dynamic operator parameter as the
operator to use in the recordset!

Any ideas??

P.S Since the date is just the year, eg 1995, it does not need to be
set as a date field, it can be set to a number or text field.

Thanks

Tom



Reply With Quote
  #3  
Old   
Elliott
 
Posts: n/a

Default Re: Dynamic operator used in a search/results page - 07-14-2003 , 11:51 AM



You would have thought that would work but it doesn't, dreamweaver (and the
previewed ASP page) still says "invalid syntax (missing operator) in query
expression..." because it does'nt recognise the mmcolparam1 parameter as a
valid substitution for an operator.

Am i missing something else?

Cheers

Tom

www.telliott.co.uk

"Julian Roberts" <newsgroup (AT) charon (DOT) co.uk> wrote

Quote:
It'd work in the same way as your search. ie. You'd have SQL like

select * from t where d mmcolparam1 mmcolparam2

so, the mmcolparam1 would be replaced by the dynamic operator.

--

Jules
http://www.charon.co.uk

Charon Cart 3
http://www.charon.co.uk/charoncart

ICQ 51328805



Elliott wrote:
Hi,
I have a search results page running where I want the user to filter
the results based on a date expression, they can select GREATER THAN,
LESS THAN or EQUAL TO from a drop down list (where the values are
'>','<' and '=') and then enter the year in a seperate text field
next to the list. The user then submits the search and the list of
results are then displayed on the following page.

What would be the best way to get this to work? I already have a
recordset on the results page to compare other field entries with the
database items (such as model type, description and colour). Since
the recordset requires me to use an operator, I don't know how to get
dreamweaver to recognise the dynamic operator parameter as the
operator to use in the recordset!

Any ideas??

P.S Since the date is just the year, eg 1995, it does not need to be
set as a date field, it can be set to a number or text field.

Thanks

Tom





Reply With Quote
  #4  
Old   
Julian Roberts
 
Posts: n/a

Default Re: Dynamic operator used in a search/results page - 07-14-2003 , 12:03 PM



What have you use as the Default for the parameter. Or it could well be a
problem with something else in the SQL statement. To troubleshoot, use this
just before opening the recordset

Response.Write recordsetname.Cource
Response.End

--

Jules
http://www.charon.co.uk

Charon Cart 3
http://www.charon.co.uk/charoncart

ICQ 51328805



Elliott wrote:
Quote:
You would have thought that would work but it doesn't, dreamweaver
(and the previewed ASP page) still says "invalid syntax (missing
operator) in query expression..." because it does'nt recognise the
mmcolparam1 parameter as a valid substitution for an operator.

Am i missing something else?

Cheers

Tom

www.telliott.co.uk

"Julian Roberts" <newsgroup (AT) charon (DOT) co.uk> wrote in message
news:beu1cv$de1$1 (AT) forums (DOT) macromedia.com...
It'd work in the same way as your search. ie. You'd have SQL like

select * from t where d mmcolparam1 mmcolparam2

so, the mmcolparam1 would be replaced by the dynamic operator.

--

Jules
http://www.charon.co.uk

Charon Cart 3
http://www.charon.co.uk/charoncart

ICQ 51328805



Elliott wrote:
Hi,
I have a search results page running where I want the user to filter
the results based on a date expression, they can select GREATER
THAN, LESS THAN or EQUAL TO from a drop down list (where the values
are '>','<' and '=') and then enter the year in a seperate text
field
next to the list. The user then submits the search and the list of
results are then displayed on the following page.

What would be the best way to get this to work? I already have a
recordset on the results page to compare other field entries with
the database items (such as model type, description and colour).
Since
the recordset requires me to use an operator, I don't know how to
get dreamweaver to recognise the dynamic operator parameter as the
operator to use in the recordset!

Any ideas??

P.S Since the date is just the year, eg 1995, it does not need to be
set as a date field, it can be set to a number or text field.

Thanks

Tom



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.