View Single Post

  #4 (permalink)  
Old 02-22-2008, 04:33 AM
Guptha_S Guptha_S is offline
Member
 
Join Date: Jan 2006
Posts: 34
Guptha_S is on a distinguished road
1. You will not be able to find until the new member select atleast one of his interest.

2. You will have to write dynamic query internally that will fire when the new member selects his interest
(I dont know on what application you are working on or which language you are using)
example if you are using check box to allow user to select his interest, then the proper event is checkbox_onclick() / checkbox_onchange - use which ever is suitable. When this event occurs, you need to execute internal query and retrieve records of members having similar interest

SELECT mem_name FROM [member table] WHERE mem_id IN (SELECT DISTINCT mem_id FROM [INTEREST Table] WHERE int1 = Chechbox_value OR int2 = Checkbox_value OR int3 = Checkbox_value)

You have to assign proper value to checkbox so as to co-relate with interest table int1 int2 int3 values

You can write above query in more than one way - that is just an example, you will have to choose the one that achieves best performance at all the times
Reply With Quote