Dynamic operator used in a search/results page

Ask a Question related to Macromedia Dreamweaver, Design and Development.

  1. #1

    Default Dynamic operator used in a search/results page

    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


    Elliott Guest

  2. Similar Questions and Discussions

    1. Search results page
      Hi - hopefully I can express my problem correctly - I'm just trying to create a search results page from a query on a linked table. Current SQL: ...
    2. Sending search results to a results page..with asp
      Please help.. very :confused; Ive setup 4 dynamic drop down boxes which populate themselves from my database, this all works fine..The last box...
    3. Help with a Grouped Search Results Page...
      I am trying to build a results page from a search box. ( I have a basic search page displaying with the correct information) but on the results page...
    4. Error in Search Results Page.
      Greetings All, What could be causing the error below ? I have a simple form where I am submitting the number of bedrooms and I expect to see all...
    5. Return Search Results on the Same Page
      I am new to ASP and would like to write a page with a drop down listbox on the top of the page. As soon as user choose a value in the dropdown,...
  3. #2

    Default Re: Dynamic operator used in a search/results page

    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
    [url]http://www.charon.co.uk[/url]

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

    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

    Julian Roberts Guest

  4. #3

    Default Re: Dynamic operator used in a search/results page

    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

    [url]www.telliott.co.uk[/url]

    "Julian Roberts" <newsgroup@charon.co.uk> wrote in message
    news:beu1cv$de1$1@forums.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
    > [url]http://www.charon.co.uk[/url]
    >
    > Charon Cart 3
    > [url]http://www.charon.co.uk/charoncart[/url]
    >
    > 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
    >
    >

    Elliott Guest

  5. #4

    Default Re: Dynamic operator used in a search/results page

    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
    [url]http://www.charon.co.uk[/url]

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

    ICQ 51328805



    Elliott wrote:
    > 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
    >
    > [url]www.telliott.co.uk[/url]
    >
    > "Julian Roberts" <newsgroup@charon.co.uk> wrote in message
    > news:beu1cv$de1$1@forums.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
    >> [url]http://www.charon.co.uk[/url]
    >>
    >> Charon Cart 3
    >> [url]http://www.charon.co.uk/charoncart[/url]
    >>
    >> 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

    Julian Roberts Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139