Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002

    Quick PHP Question

    Im coding a ratio system for my site, and Im stuck.

    Basically, I have 2 website url fiends that every user can edit in their profile. I need my script to search both fields for a match. I want it to find a match in either of the 2 website fields.

    The current code Im attempting to use is as follows:
    PHP Code:
    $resultU mysql_query("SELECT website, website2 FROM users WHERE website = '$submitted_domain' or website2 = '$submitted_domain'") or die ("Couldn't check the submitted domain"); 
    Can "OR" be used in a sql statement?

  2. #2
    Yes it can but you're going through all the users (shouldn't that be one user?).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts