【小(xiǎo)編推薦】人(rén)人(rén)商城(ch☆ éng)獲取所有(yǒu)的(de)下(φ♥$♥xià)級用(yòng)戶

2025-01-05   |✔δ¥∑   發布者:&nπ ✔bsp;  |&nb§±ε₽sp;  查看(kàn):3≠±320次

人(rén)人(rén)商城(chéng)二次開(kāi✔¥λ™)發

使用(yòng)了(le) 最原始的(de)方法。←♥​哈哈

     γ€$echo  $this->g®✘→esuoyouxiaji(3);// 輸"∑出4,7,5,1,2,6
  β ≠  // 獲取所有(yǒu)的(de)下(xià)級  ₹< 
		public function gesuoyouxiaλ©ji($uid)
		{
			global $_W, $_GPCσ​>;
			$agents='';
  &nb±•↔☆sp;         $ag♥©∞ents1 = pdo_fetch('selec§β∞δt GROUP_CONCAT(id) AS id_list  ₩≠£•from ' . tablename('ewei_shop_meφ$≥mber') . ' where age∏"¥♥ntid in ('.$uid.')');//查找一(yī)級
&n§☆εbsp;         &nb©♠ sp;         &nbs<✔"≥p;print_r($agents1);§✔∑©
				if($agents1['id_list']!←σ←​=''){
				    $a≤≠gents=$agents1['id_list'];

					$a₹€₽σgents2 = pdo_fetch('s♥₩±♦elect GROUP_CONCAT(id) AS id_list&nbσ×÷≠sp; from ' . tablename('ewei_sho☆÷₽↔p_member') . ' where agentid in ('.$ag$♠ents1['id_list'].')');//β↓查找2級
				    	print_r(♠§≠$agents2);
				  if($agents2 ←['id_list']!=''){
				&n¶↔≈&bsp;     $agents=$agents.',§λ'.$agents2['id_list'];

				  →∑₩  	$agents3 = pdo_fetch(±©≤§'select GROUP_CONCAT(id) AS id_li↔ε$÷st  from ' . tablename('ewei_sh♥γ£×op_member') . ' where age∞ ♦ntid in ('.$agents2['id_list÷☆'].')');//查找3級
				&φ&>nbsp;   	print_r($agents3);
	↔δ‌			    if(÷→®≈$agents3['id_list']!=''){
				 ≥<     $agents=$ag"≤ents.','.$agents3['id_l★Ω ist'];

				    	$agenδ"ts4 = pdo_fetch('select ±σεGROUP_CONCAT(id) AS id_li‍& ±st  from ' . tablenamσ<×γe('ewei_shop_member') λ±. ' where agentid in ('.$agents$€σα3['id_list'].')');//查找4級
				  ±<‍​  	print_r($agents4);
				>↕  if($agents4['id_list']!=''★φ){
				      $agen♣→¶ts=$agents.','.$agents4['id_✔₩≈list'];

			    	}	
♣↑↓↔
				    	
♣∑φ			    	}	
				 •¶'   	

			 ♦δ"   	}	
				}
				
		  &nbs♣↕p; return  $agents;α¶₩•
		}