query matching
Posted: Tue May 18, 2010 5:46 pm
I am trying to create some sort of couple matching. I have 2 tables namely Boy and Girl which both have the same fields which is shown below
ID
Name
Age
Birthdate
Bith Sign
Hobbies
Interests
I want to rank them according to the sample fields I provided above.
In the web form, the fields for Birth Sign, Hobbies and Interests are in drop down format so that I can limit the answer of the users therefore the matching process will be easier i guess.
I split up the data based on their gender and later on I plan to join the two tables together for the matching but right now I do not have any idea on what will be my sql query for the matching process.
Now I am having a difficulty on how can I display the result of the matching and the result must be in ranking order.
For example the result should somehow look like this.
| BOY | GIRL | RANK |
+====+====+=====+
| John | Sarah | 1 |
| John | Kate | 2 |
| John | Sammy | 3 |
| John | Donna | 4 |
| John | Tanya | 5 |
Any idea on how can this be done? Thanks
ID
Name
Age
Birthdate
Bith Sign
Hobbies
Interests
I want to rank them according to the sample fields I provided above.
In the web form, the fields for Birth Sign, Hobbies and Interests are in drop down format so that I can limit the answer of the users therefore the matching process will be easier i guess.
I split up the data based on their gender and later on I plan to join the two tables together for the matching but right now I do not have any idea on what will be my sql query for the matching process.
Now I am having a difficulty on how can I display the result of the matching and the result must be in ranking order.
For example the result should somehow look like this.
| BOY | GIRL | RANK |
+====+====+=====+
| John | Sarah | 1 |
| John | Kate | 2 |
| John | Sammy | 3 |
| John | Donna | 4 |
| John | Tanya | 5 |
Any idea on how can this be done? Thanks