|
|
@@ -269,7 +269,7 @@ function sql($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time,$last_tbl,$path,$ta
|
|
|
}
|
|
|
|
|
|
|
|
|
-function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time,$last_tbl='n/s',$path) {
|
|
|
+function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time,$last_tbl='n/s',$path,$table_class) {
|
|
|
global $db,$tables;
|
|
|
$loop++;
|
|
|
echo "\n<hr>###LOOP ".$loop." path:".$path;
|
|
|
@@ -278,7 +278,11 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time,$last_tbl='n/s
|
|
|
$sql = array();
|
|
|
$sql_RELAND = array();
|
|
|
|
|
|
- sql($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time,$last_tbl,$path,'Z');
|
|
|
+ if($table_class=='X') {
|
|
|
+ echo "\n<br># 282 finished on last X";
|
|
|
+ } else {
|
|
|
+ sql($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time,$last_tbl,$path,'Z');
|
|
|
+ }
|
|
|
sql($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time,$last_tbl,$path,'X');
|
|
|
|
|
|
/*foreach($tables['Z'] as $Z=>$z) {
|
|
|
@@ -548,7 +552,7 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop,$last_tbl,$path,$ta
|
|
|
$hist_loop_root_cur['hist_time'][]=$h;
|
|
|
// print_r($hist_loop);
|
|
|
$path_root=add_path($path,$T,$table_class);
|
|
|
- dig_next($hist_loop_root_cur['hist_loop'], $tables[$table_class][$T],$h,$loop,$hist_loop_root_cur['hist_time'],$last_tbl,$path_root);
|
|
|
+ dig_next($hist_loop_root_cur['hist_loop'], $tables[$table_class][$T],$h,$loop,$hist_loop_root_cur['hist_time'],$last_tbl,$path_root,$table_class);
|
|
|
//rel dzieci $tables['Z']['BI_audit_CEIDG']['ref'][19]='BI_audit_CEIDG_pelnomocnicy';
|
|
|
if(isset($tables[$table_class][$T]['ref'])) {
|
|
|
// echo "<br>#296 try to ref tables for T ".$T."<pre>";
|
|
|
@@ -573,7 +577,7 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop,$last_tbl,$path,$ta
|
|
|
// $hist_time[][$ref_table]=$h_rel_rec;
|
|
|
$hist_loop_cur['hist_time'][]=$sql_rel_rec." #435".$path;
|
|
|
$hist_loop_cur['hist_time'][]=$h_rel_rec;
|
|
|
- dig_next($hist_loop_cur['hist_loop'],$tables[$table_class][$ref_table],$h_rel_rec,$loop,$hist_loop_cur['hist_time'],$ref_table,add_path($path_root,$ref_table,$table_class));
|
|
|
+ dig_next($hist_loop_cur['hist_loop'],$tables[$table_class][$ref_table],$h_rel_rec,$loop,$hist_loop_cur['hist_time'],$ref_table,add_path($path_root,$ref_table,$table_class),$table_class);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -602,7 +606,7 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop,$last_tbl,$path,$ta
|
|
|
//$hist_time[][$ref_table]=$h_rel_rec;
|
|
|
$hist_loop_cur['hist_time'][$ref_table][]=$sql_rel_rec." #464".$path;
|
|
|
$hist_loop_cur['hist_time'][$ref_table][]=$h_rel_rec;
|
|
|
- dig_next($hist_loop_cur['hist_loop'],$tables[$table_class][$ref_table],$h_rel_rec,$loop,$hist_loop_cur['hist_time'],$ref_table,add_path($path_root,$ref_table,$table_class));
|
|
|
+ dig_next($hist_loop_cur['hist_loop'],$tables[$table_class][$ref_table],$h_rel_rec,$loop,$hist_loop_cur['hist_time'],$ref_table,add_path($path_root,$ref_table,$table_class),$table_class);
|
|
|
}
|
|
|
}
|
|
|
}
|