Or a logical operation, the algorithm is simply: Two conditions are the same (true or false) is False (0), two conditions are different is true (1), null and any conditions do not XOR or operation is null, if mathematically understood is that the set and any collection of the intersection is empty.
MySQL xor operator is ^ or XOR
Two conditions that are true are different or, as a result, false.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6E/60/wKiom1V6bq_iUkcwAABEQlyQkaU645.jpg "title=" Xor1.jpg "alt=" Wkiom1v6bq_iukcwaabeqlyqkau645.jpg "/>
Two different conditions for false or false.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/60/wKiom1V6by7B3J18AAA-9bDKeD4079.jpg "title=" Xor3.jpg "alt=" Wkiom1v6by7b3j18aaa-9bdked4079.jpg "/>
One condition is true, one condition is false, and the result is true
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6E/5D/wKioL1V6cRDwT65LAABGRaNw770989.jpg "title=" Xor2.jpg "alt=" Wkiol1v6crdwt65laabgranw770989.jpg "/>
Null is different from any condition (true, false, null), and the result is null
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6E/5D/wKioL1V6cVLCp0AtAADUa31dzbA518.jpg "title=" Xor4.jpg "alt=" Wkiol1v6cvlcp0ataadua31dzba518.jpg "/>
What's the use of saying so much? Encountered an XOR SQL injection, is to use this method to judge the ...
This article from "Lao Xu's Private Food" blog, declined to reprint!
MySQL XOR operation