Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Filter by group

Explorer ,
Sep 13, 2006 Sep 13, 2006
Hello everybody

Is there anyway that I can create a link to an Access database that will display records filtered in groups where the filters will be variables? I was thinking of a link something along the lines of ' filename.asp?firstVar secondVar' for the link and then some form of SQL query on the page holding the recordset.

Any ideas?

Martin
TOPICS
Server side applications
295
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Sep 13, 2006 Sep 13, 2006
Yep, so if your url read...

filename.asp?firstvar=1&secondvar=2

...you could build this into your SQL using the Request.QueryString command, eg.

SQL = "SELECT * FROM yourTable WHERE Field1='" & Request.QueryString("firstvar") & "' AND Field2='" & Request.QueryString("secondvar") & "'"

If you're using the Dreamweaver recordset builder, you'd enter a suitable name for the criteria value in the SQL window and then create the variables in the variable window with the values as Request.QueryStrin...
Translate
Explorer ,
Sep 13, 2006 Sep 13, 2006
Yep, so if your url read...

filename.asp?firstvar=1&secondvar=2

...you could build this into your SQL using the Request.QueryString command, eg.

SQL = "SELECT * FROM yourTable WHERE Field1='" & Request.QueryString("firstvar") & "' AND Field2='" & Request.QueryString("secondvar") & "'"

If you're using the Dreamweaver recordset builder, you'd enter a suitable name for the criteria value in the SQL window and then create the variables in the variable window with the values as Request.QueryString("firstvar") etc.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 15, 2006 Sep 15, 2006
LATEST
Thanks!

Works like a dream!

M
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines