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

Dynamic list with checkboxes and multiple criteria selection in MySQL

Guest
Feb 03, 2010 Feb 03, 2010

Hope someone can help me out with this:

- I have a MySQL table with contacts (name, address, phone etc.)
- Each contact is attributed a "Category" value
- These category values are retrieved from a separate table (ex: 10-work, 20-friends, 30-soccer team etc.; the values 10, 20 or 30 are stored in the contacts table in the field "category")
- Each contact only needs one contact value.

So far no problem.

Now I want to be able to make selections in the contacts table. For instance cat 10 only, cat 10 and 20 or cat 10 and 30 without 20.
The list with possible selection keys must be generated dynamically (all the category designations linked to their category value)

Users then must be able to tick a check box in order to select the categories they want. By ticking the box, they attribute the category value to the variable linked to the check box.

They have to see the selection results on a next page.

Here are my questions:

- How can I dynamically generate in DW this list with the corresponding checkboxes for selecting my records?
- What should be the WHERE-statement with which I make the selection from my MySQL contacts table?

Any help will be greatly appreciated.

Kind regards,

Erik

TOPICS
Server side applications
404
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
Guest
Feb 03, 2010 Feb 03, 2010
LATEST

To make perhaps my question a little more clear, this is an example of how I would the result to look like

:

http://www.latitudes.co.uk/dept_search_pages/search_provence.php

where the labels with the checkboxes are retrieved from the 'category' table and when one or more boxes are ticked, the corresponding values are used to make the selection in the WHERE statement in the MySQL query.

Hope someone can help me out.

Erik

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