I have the following snippet in a block of code and I need to make sure I am understanding it correctly. As I understand it, doesn't this contradict itself? What is the point of having this RecordType==2 and also !=2?
Snippet:
if( ($row['RecordType']==2 && $row['AssignedTech'] == $empnumber) || ($row['RecordType']!=2))
My Interpretation:
If the RecordType EQUALS 2 AND AssignedTech EQUALS $empnumber OR RecordType DOES NOT EQUAL 2
It could be simplified to:
if ($row['RecordType'] !=2 || $row['AssignedTech'] == $empnumber)
If RecordType
is 2, then AssignedTech
should be $empnumber
, otherwise it doesn't matter and we're all good.