Comparing fields

Discussion in 'PHP' started by jsamdirect, Nov 7, 2007.

  1. #1
    I am trying to select a row from mysql where two fields in the same table match a criteria or one field in the same table matched a criteria.

    When I run the query I do not get any errors but I also do not get any results. Looking at the actually data, I should get results.

    Can fields be compared like this in a single query?

    For example:

    "SELECT * FROM users WHERE field1='0' OR field2<feild3"
     
    jsamdirect, Nov 7, 2007 IP