I assume here that message.mID is a unique identifier. If so you should
only get one record back from the query below.
I would then compare the rest of the form variables against your query results.
<cfquery name="CheckUser" datasource=#ds#>
SELECT messages.mID, messages.from_email, members.email, members.password
FROM messages, members
WHERE messages.mID = #form.ID#
</cfquery>
<cfif CheckUser.RecordCount lt 1>
handle no records returned
<cfelseif #form.password# eq CheckUser.password AND #form.email# =
CheckUser.from_email >
do what you need to do
<cfelse>
Output query results to screen and form results...etc
the form stuff didn't match the record
</cfif>
Does that help? Also for advanced SQL you might look at Joe Celko's SQL
for Smarties: Advanced SQL Programming, I just picked up a copy and really
like it so far. The isbn is 1-55860-576-2.
Good luck.
Blithe Brandon
[EMAIL PROTECTED]
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.