You ( ) around your OR statements

Example:

  sql = "SELECT * FROM SomeTable "
  sql = sql & "WHERE (Email = '" & Request("un") & "'"
  sql = sql & " OR SEmail = '" & Request("un") & "')"
  sql = sql & " AND IsDeleted = 0 "
  sql = sql & " AND Password = '" & Request("pw") & "'"
  sql = sql & " AND Approved = 1 "
  sql = sql & " AND Registered = 1 "



>>> [EMAIL PROTECTED] 12/02/02 11:30AM >>>
Hi all,

Sorry for the OT but this should be a quick answer. This is in ASP
(sorry).

If I have the following:
  sql = "SELECT * FROM SomeTable "
  sql = sql & "WHERE Email = '" & Request("un") & "'"
  sql = sql & " OR SEmail = '" & Request("un") & "'"
  sql = sql & " AND IsDeleted = 0 "
  sql = sql & " AND Password = '" & Request("pw") & "'"
  sql = sql & " AND Approved = 1 "
  sql = sql & " AND Registered = 1 "

Where Email is the "primary" email and SEmail is a "secondary" email
address
(both are different addresses). If the submission doesn't match the
first
then it matches the second, how do I account for that? Right now, I am
getting an error because the record doesn't match.

Any ideas?

Thanks,
Tony


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to