naveenbj Posted June 6, 2008 Share Posted June 6, 2008 Hello Thanks for your time Im wrking on a dating site and i have a new section called "My ideal match", where the member fills out who he feels would be his best match....such as , Female, ages 20-23, observant, 5'3"-5'9" etc... i want to know how to create a system that automatically generates search results based on the person's preference that user filled out in the My ideal matches. then, these results would be sent to his email address as well... Is there is any built application or i have to code from screcth.I have such idea for it like how i will proceed but need sm guidence so that i can move ahead Thanks Nj Quote Link to comment https://forums.phpfreaks.com/topic/108976-automatic-generate-search-details/ Share on other sites More sharing options...
jonsjava Posted June 6, 2008 Share Posted June 6, 2008 Just have the script cross-check your "ideal match" table every time that someone signs up/updates their profile for people looking for someone like the person updating their profile. Basically, run a 2nd query, that is something like this: SELECT * FROM `ideal_match_table WHERE `age_range`='$my_age' AND `height` !> '$my_height' AND `height` !< '$my_height'...... something like that. Quote Link to comment https://forums.phpfreaks.com/topic/108976-automatic-generate-search-details/#findComment-559093 Share on other sites More sharing options...
hansford Posted June 6, 2008 Share Posted June 6, 2008 you can code this yourself. When you do your query from the DB. It would be something like this. $query = "SELECT * FROM users WHERE idealmatch = 'female' AND ages = '20-23' AND height = '5-3 to 5-9' etc.. You would probably want linking tables as this would be a bit much for one table, but you get the idea. Then when the results come up empty for some poor slob. You just re-query the DB dropping off one by one whatever his/her ideal is until you find him/her a match! hehe Quote Link to comment https://forums.phpfreaks.com/topic/108976-automatic-generate-search-details/#findComment-559099 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.