标签:func ber style pre 查询 fun ble 获取 array
递归查询
public function get_allagent($agentid=0,$ids=[]){ global $_W; $agent1 = pdo_fetchall("select id from " . tablename("ewei_shop_member") . " where agentid=:agentid and uniacid=:uniacid", array(":uniacid" => $_W["uniacid"],":agentid"=>$agentid)); foreach ($agent1 as $key =>$value){ array_push($ids,$value[‘id‘]); $agent2 = pdo_fetchall("select id from " . tablename("ewei_shop_member") . " where agentid=:agentid and uniacid=:uniacid", array(":uniacid" => $_W["uniacid"],":agentid"=>$value[‘id‘])); if($agent2){ $ids = $this->get_allagent($value[‘id‘],$ids); } } return $ids; }
标签:func ber style pre 查询 fun ble 获取 array
原文地址:https://www.cnblogs.com/xuanjiange/p/12831325.html