4 Replies Latest reply on Sep 17, 2006 10:08 PM by bregent

    filter recordset based on cookies

    Level 7
      HI all,
      I am string ID's of records choosen by the user in a Cookie.
      Values are stored as following:
      LB41 = 41
      LB441 = 441
      LB442 = 442 and so on

      I want to filter a recordset based on the cookie values, so only the records
      with the ID in cookie such as 41, 441 and 442.. will be filtered and then
      mailed to the user.

      The only missing part is the filtering of database.

      Any hint to a tutorial or help will be highly appreciated.

      Regards



        • 1. Re: filter recordset based on cookies
          Level 7
          i am saving ID's ....


          "Help" <fkan@lycos.de> schrieb im Newsbeitrag
          news:eeigov$mnm$1@forums.macromedia.com...
          > HI all,
          > I am string ID's of records choosen by the user in a Cookie.
          > Values are stored as following:
          > LB41 = 41
          > LB441 = 441
          > LB442 = 442 and so on
          >
          > I want to filter a recordset based on the cookie values, so only the
          > records with the ID in cookie such as 41, 441 and 442.. will be filtered
          > and then mailed to the user.
          >
          > The only missing part is the filtering of database.
          >
          > Any hint to a tutorial or help will be highly appreciated.
          >
          > Regards
          >
          >
          >


          • 2. Re: filter recordset based on cookies
            bregent Most Valuable Participant
            Just edit the sql query to use the value stored in the cookie. I guess I don't really understand where the problem is.
            • 3. Re: filter recordset based on cookies
              Level 7
              well i did that.
              In the cookie there are more than 1 ID (value) stored.
              So it has to go through a loop. ID's in the cookie are matched with the ID's
              in the recordset and only the matching records are filtered.


              "bregent" <webforumsuser@macromedia.com> schrieb im Newsbeitrag
              news:eeikjs$q4a$1@forums.macromedia.com...
              > Just edit the sql query to use the value stored in the cookie. I guess I
              > don't really understand where the problem is.


              • 4. Re: filter recordset based on cookies
                bregent Most Valuable Participant
                >So it has to go through a loop. I

                Loop through the cookies to build a string of comma seperated values and then use that string with the SQL IN predicate.