a.binder 8 rokov pred
rodič
commit
876594b2b9

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

@@ -100,6 +100,7 @@ function start_dig($tables) {
 function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
 function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
 	 global $db,$tables;
 	 global $db,$tables;
 	 $loop++;
 	 $loop++;
+	 echo "###LOOP ".$loop;
 	 if($loop>5) die(' loop '.$loop);
 	 if($loop>5) die(' loop '.$loop);
 	//detect next ref tbls
 	//detect next ref tbls
 	 $sql = array();
 	 $sql = array();
@@ -129,12 +130,15 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
 			 	 $sql_t[$T].=" `".$col."` = '".$val." " ;
 			 	 $sql_t[$T].=" `".$col."` = '".$val." " ;
 		 	 }
 		 	 }
 		 	 //not loop
 		 	 //not loop
-		 	 foreach($hist_loop[$T] as $hist_rec) {
-			 	 $sql_t[$T].=" and ID!='".$hist_rec->ID."' ";
+		 	 if( isset($hist_loop[$T])) {
+			 	 foreach($hist_loop[$T] as $hist_rec) {
+				 	 $sql_t[$T].=" and ID!='".$hist_rec->ID."' ";
+			 	 }
 		 	 }
 		 	 }
 	 	 }
 	 	 }
-	 
+	 echo "sql";
 	  print_r($sql);
 	  print_r($sql);
+	  echo "sql_t";
 	  print_r($sql_t);
 	  print_r($sql_t);
 	  
 	  
 	  foreach($sql_t as $T => $sql_ext) {
 	  foreach($sql_t as $T => $sql_ext) {
@@ -145,6 +149,7 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
 		 }
 		 }
 	  }
 	  }
 	  //todo look in Y and die()
 	  //todo look in Y and die()
+	  
 	
 	
 }
 }