Hi guys,
I'm working on the search page of a dating application.
In the form where the user gets to choose his/her preferred partner
there are a few checkboxes which says:
I am searching for:
Love
Casual
Travel mate
Friend
When displayed as checkboxes i'm pulling from a table called
tbl_020publicAttributes (fields: attributeID, attributeName).
All users with profiles on the site have their attributes in a join
table called tbl_020publicProfilesAttributes (fields profileID,
attributeID)
So when a visitor comes to the site and fills out a search form i
want the results to also include the stated type of attributes they
are looking for.
So far my form works but i have no idea how i am going to also
include this other table tbl_020publicProfilesAttributes:
<cfquery name="FindMatches" datasource="user020">
SELECT profileID, userID, profileTitle, gender,
genderSeeking, screenName, location, locationID, locationName, age,
confirmationID, imageName, imageAuthorisation
FROM tbl_020publicProfiles, tbl_020publicLocations
WHERE gender = '#form.genderSeeking#' AND genderSeeking =
'#form.gender#' AND confirmationID = 'yes' AND userID <>
<cfqueryparam value='#Client.KissMyDate_UserID#'
cfsqltype="cf_sql_integer" maxlength="4"> AND
tbl_020publicLocations.locationID =
tbl_020publicProfiles.location<cfif isDefined('form.location') and
form.location neq 0> AND location = '#form.location#'</cfif><cfif
isDefined('form.minAge') and form.minAge neq 0> AND age >=
#form.minAge#</cfif><cfif isDefined('form.maxAge') and form.maxAge
neq 0> AND age <= #form.maxAge#</cfif><cfif isDefined
('form.hasPhotograph') and form.hasPhotograph eq 1> AND
imageAuthorisation = 1</cfif>
ORDER by confirmationDate DESC
</cfquery>
Any help i'd be very grateful with.
Thanks,
Saturday
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212004
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54