|
|
@@ -91,13 +91,14 @@ function start_dig($tables) {
|
|
|
$res=$db->query($sql);
|
|
|
while($h=$db->fetch($res)) {
|
|
|
$hist_loop[$Y][]=$h;
|
|
|
- dig_next($hist_loop,$t,$h,1);
|
|
|
+ $hist_time[][$Y]=$h;
|
|
|
+ dig_next($hist_loop,$t,$h,$hist_time);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
-function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
|
|
|
+function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time) {
|
|
|
global $db,$tables;
|
|
|
$loop++;
|
|
|
echo "\n<hr>###LOOP ".$loop;
|
|
|
@@ -230,7 +231,7 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
|
|
|
echo "\n<hr> #177 POWIAZANIE ZNALEZIONE DLA X <pre>";
|
|
|
print_r($h);
|
|
|
echo "<br> Historia sledzen:";
|
|
|
- print_r($hist_loop);
|
|
|
+ print_r($hist_time);
|
|
|
echo "#177 eof </pre>";
|
|
|
}
|
|
|
}
|
|
|
@@ -267,7 +268,7 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
|
|
|
|
|
|
if( isset($sql_t)) {
|
|
|
foreach($sql_t as $T => $sql_ext) {
|
|
|
- dig_arr_cur($hist_loop,$T,$sql_ext);
|
|
|
+ dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time);
|
|
|
}
|
|
|
}
|
|
|
//todo look in Y and die()
|
|
|
@@ -276,7 +277,7 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-function dig_arr_cur($hist_loop,$T,$sql_ext) {
|
|
|
+function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time) {
|
|
|
global $db,$tables;
|
|
|
|
|
|
echo "\n<br>216: Querying :T ".$T." ext: ".$sql_ext ;
|
|
|
@@ -284,7 +285,7 @@ function dig_arr_cur($hist_loop,$T,$sql_ext) {
|
|
|
while($h=$db->fetch($res)) {
|
|
|
echo "\n<br> #149 found ";// print_r($h);
|
|
|
$hist_loop[$T][]=$h;
|
|
|
-
|
|
|
+ $hist_time[][$T]=$h;
|
|
|
// print_r($hist_loop);
|
|
|
|
|
|
dig_next($hist_loop, $tables['Z'][$T],$h,$loop);
|
|
|
@@ -298,7 +299,8 @@ function dig_arr_cur($hist_loop,$T,$sql_ext) {
|
|
|
echo "<br>#159 ref tbl ".$sql_rel_rec;
|
|
|
while($h_rel_rec=$db->fetch($res_rel_rec)){
|
|
|
$hist_loop[$ref_table][]=$h_rel_rec;
|
|
|
- dig_next($hist_loop,$tables['Z'][$ref_table],$h_rel_rec,$loop);
|
|
|
+ $hist_time[][$ref_table]=$h_rel_rec;
|
|
|
+ dig_next($hist_loop,$tables['Z'][$ref_table],$h_rel_rec,$loop,$hist_time);
|
|
|
}
|
|
|
}
|
|
|
}
|