CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Dynamic search options

Print topic Send  topic

Author Message
yeowza

Posts: 16
Posted: 01/07/2009, 11:23 AM

I'm hoping for a few suggestions on a search I'm setting up. I'll try and describe it simply.

I have a member table with standard data. I also have a profile type table. This is a list of 1-n (admin controlled) profile types(i.e. hobbies, height, weight). Then I have a profile type list of values for each type. The type list has an ID to the type table. Each member can then setup their profile with the appropriate info. This is stored in a link table (i.e. memberid, profile type list id).

This is all working fine. Now I need to create an option to allow members to search on these profile types. I want to build the search page with a list of the profile types (1-n) and the values in a drop down list. I can manually setup a page but I was hoping to create the number of drop downs dynamically since it can change when the administrator adds or removes profile types.

Has anyone done anything similar? I hope my explanation was clear enough.
View profile  Send private message
maxhugen

Posts: 272
Posted: 01/11/2009, 5:05 PM

Can you use the Grid Builder to create both Search and Grid?

The query would be a join, eg member->profile_type->profile_type_item. That gives you access to the fields you want to search on. The query would return only fields like the member_name, and be SELECT DISTINCT so you don't get multiple rows per member.

In the CCS-created search form, you may want to consider AJAX "Dependent List Boxes" so that when a user selects profile_type, they then get a further option of selecting a profile_type_item.

Does that help any?
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.