|
|
@@ -404,12 +404,17 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop,$last_tbl,$path) {
|
|
|
while($h=$db->fetch($res)) {
|
|
|
echo "\n<br> #149 found ".$h->ID;
|
|
|
// echo "<pre>"; print_r($h); echo "</pre>";
|
|
|
- $hist_loop[$T][]=$h;
|
|
|
- $hist_time[][$T]=$sql_ext." ##408 ".$path;
|
|
|
- $hist_time[][$T]=$h;
|
|
|
+// $hist_loop[$T][]=$h;
|
|
|
+// $hist_time[][$T]=$sql_ext." ##408 ".$path;
|
|
|
+// $hist_time[][$T]=$h;
|
|
|
+ $hist_loop_root_cur['hist_loop']=$hist_loop;
|
|
|
+ $hist_loop_root_cur['hist_time']=$hist_time;
|
|
|
+ $hist_loop_root_cur['hist_loop'][$T][]=$h;
|
|
|
+ $hist_loop_root_cur['hist_time'][]=$sql_ext." ##408 ".$path;
|
|
|
+ $hist_loop_root_cur['hist_time'][]=$h;
|
|
|
// print_r($hist_loop);
|
|
|
|
|
|
- dig_next($hist_loop, $tables['Z'][$T],$h,$loop,$hist_time,$last_tbl,add_path($path,$T));
|
|
|
+ dig_next($hist_loop_root_cur['hist_loop'], $tables['Z'][$T],$h,$loop,$hist_loop_root_cur['hist_time'],$last_tbl,add_path($path,$T));
|
|
|
//rel dzieci $tables['Z']['BI_audit_CEIDG']['ref'][19]='BI_audit_CEIDG_pelnomocnicy';
|
|
|
if(isset($tables['Z'][$T]['ref'])) {
|
|
|
// echo "<br>#296 try to ref tables for T ".$T."<pre>";
|
|
|
@@ -426,14 +431,14 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop,$last_tbl,$path) {
|
|
|
echo "<br>#159 ref tbl ".$sql_rel_rec;
|
|
|
while($h_rel_rec=$db->fetch($res_rel_rec)){
|
|
|
echo "#315 fnd:".$h_rel_rec->ID;
|
|
|
- $hist_loop_cur['hist_loop']=$hist_loop;
|
|
|
- $hist_loop_cur['hist_time']=$hist_time;
|
|
|
+ $hist_loop_cur=$hist_loop_root_cur;
|
|
|
+// $hist_loop_cur['hist_time']=$hist_time;
|
|
|
//$hist_loop[$ref_table][]=$h_rel_rec;
|
|
|
$hist_loop_cur['hist_loop'][$ref_table][]=$h_rel_rec;
|
|
|
// $hist_time[][$ref_table]=$sql_rel_rec;
|
|
|
// $hist_time[][$ref_table]=$h_rel_rec;
|
|
|
- $hist_loop_cur['hist_time'][$ref_table][]=$sql_rel_rec." #435".$path;
|
|
|
- $hist_loop_cur['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['Z'][$ref_table],$h_rel_rec,$loop,$hist_loop_cur['hist_time'],$ref_table,add_path($path,$ref_table));
|
|
|
}
|
|
|
}
|
|
|
@@ -454,8 +459,8 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop,$last_tbl,$path) {
|
|
|
echo "<br>#324 ref tbl ".$sql_rel_rec;
|
|
|
while($h_rel_rec=$db->fetch($res_rel_rec)){
|
|
|
echo "#315 fnd:".$h_rel_rec->ID;
|
|
|
- $hist_loop_cur['hist_loop']=$hist_loop;
|
|
|
- $hist_loop_cur['hist_time']=$hist_time;
|
|
|
+ $hist_loop_cur=$hist_loop_root_cur;
|
|
|
+// $hist_loop_cur['hist_time']=$hist_time;
|
|
|
// $hist_loop[$ref_table][]=$h_rel_rec;
|
|
|
$hist_loop_cur['hist_loop'][$ref_table][]=$h_rel_rec;
|
|
|
|