a.binder hace 8 años
padre
commit
876594b2b9
Se han modificado 1 ficheros con 8 adiciones y 3 borrados
  1. 8 3
      SE/dev/audit_krs_con_digger/audit_krs_con_digger.php

+ 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) {
 	 global $db,$tables;
 	 $loop++;
+	 echo "###LOOP ".$loop;
 	 if($loop>5) die(' loop '.$loop);
 	//detect next ref tbls
 	 $sql = array();
@@ -129,12 +130,15 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
 			 	 $sql_t[$T].=" `".$col."` = '".$val." " ;
 		 	 }
 		 	 //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);
+	  echo "sql_t";
 	  print_r($sql_t);
 	  
 	  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()
+	  
 	
 }