Greetings,
given :
SELECT * FROM leads Where rowid = '$rowid' AND company = '$currentusercompany' OR company = '$currentusercompany2'
Is there OR only comparing the company field variables or is it also including rowid and if rowid doesnt compare it will select it because a company matches?
Example:
rowid=555
$currentusercompany=test1
$currentusercompany2=test2
which database records would be selected?:
rowid company
555 test1
554 test2
553 test1
ONLY the record with rowid 555 should be selected right? sense rowid 555 is a requirement but it can be eighter company...
Sorry for the wierd example, im just not sure how to word it better
given :
SELECT * FROM leads Where rowid = '$rowid' AND company = '$currentusercompany' OR company = '$currentusercompany2'
Is there OR only comparing the company field variables or is it also including rowid and if rowid doesnt compare it will select it because a company matches?
Example:
rowid=555
$currentusercompany=test1
$currentusercompany2=test2
which database records would be selected?:
rowid company
555 test1
554 test2
553 test1
ONLY the record with rowid 555 should be selected right? sense rowid 555 is a requirement but it can be eighter company...
Sorry for the wierd example, im just not sure how to word it better