MySQL中and和or的优先级 MySQLphp MySQL MySQL中关于and和or的运算,类似与*和+的预算,举例如下 -- 这个返回返回全部数据 select * from table_a where 1 or 0 and 0; --这个返回空集 select * from table_a where 0 or 1 and 0; php if (1 || 0 && 0) { //会执行 } if (0 || 1 && 0) { //不会执行 }