a.binder 8 yıl önce
ebeveyn
işleme
f2edb4eaab

+ 13 - 3
SE/dev/audit_krs_con_digger/audit_krs_con_digger.php

@@ -91,14 +91,16 @@ function start_dig($tables) {
 		$res=$db->query($sql);
 		 while($h=$db->fetch($res)) {
 			 $hist_loop[$Y][]=$h;
-			 dig_next($hist_loop,$t,$h);
+			 dig_next($hist_loop,$t,$h,1);
 		 }
 	}
 }
 
 
-function dig_next($hist_loop,$prev_tbl,$prev_dig) {
+function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
 	 global $db,$tables;
+	 $loop++;
+	 if($loop>5) die(' loop '.$loop);
 	//detect next ref tbls
 	 $sql = array();
 	 foreach($tables['Z'] as $Z=>$z) {
@@ -134,7 +136,15 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig) {
 	 
 	  print_r($sql);
 	  print_r($sql_t);
-
+	  
+	  foreach($sql_t as $T => $sql_ext) {
+		  $res=$db->query($sql_ext);
+		  while($h=$db->fetch($res)) {
+			 $hist_loop[$Y][]=$h;
+			 dig_next($hist_loop,$t,$h,$loop);
+		 }
+	  }
+	  //todo look in Y and die()
 	
 }