摘要:
在where中可以包含任意数目的and和or操作符,需要注意的是在没有任何其他符号的时候,例如括号,AND的优先级高于OR,因此,当两者一起使用时,先运算AND两边的条件表达式,再运算OR两边的条件表达式。 eg. select * from table from id=1 or id=2 and 阅读全文
摘要:
public function getTree($list,$pid,$level){ //此处须是静态数组,不然递归的时候每次都会声明一个新的数组 static $tree = []; foreach ($list as $row) { if ($row['parent_major'] == $p 阅读全文