|
@@ -121,7 +121,7 @@ function start_dig($tables) {
|
|
|
while($h=$db->fetch($res)) {
|
|
while($h=$db->fetch($res)) {
|
|
|
$hist_loop[$Y][]=$h;
|
|
$hist_loop[$Y][]=$h;
|
|
|
$hist_time[][$Y]=$h;
|
|
$hist_time[][$Y]=$h;
|
|
|
- dig_next($hist_loop,$t,$h,1,$hist_time);
|
|
|
|
|
|
|
+ dig_next($hist_loop,$t,$h,1,$hist_time,$Y);
|
|
|
unset($hist_time);
|
|
unset($hist_time);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -131,7 +131,7 @@ function start_dig($tables) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time) {
|
|
|
|
|
|
|
+function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time,$last_tbl='n/s') {
|
|
|
global $db,$tables;
|
|
global $db,$tables;
|
|
|
$loop++;
|
|
$loop++;
|
|
|
echo "\n<hr>###LOOP ".$loop;
|
|
echo "\n<hr>###LOOP ".$loop;
|
|
@@ -359,7 +359,7 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time) {
|
|
|
*/
|
|
*/
|
|
|
if( isset($sql_t)) {
|
|
if( isset($sql_t)) {
|
|
|
foreach($sql_t as $T => $sql_ext) {
|
|
foreach($sql_t as $T => $sql_ext) {
|
|
|
- dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop);
|
|
|
|
|
|
|
+ dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop,$last_tbl);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//todo look in Y and die()
|
|
//todo look in Y and die()
|
|
@@ -369,10 +369,10 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop) {
|
|
|
|
|
|
|
+function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop,$last_tbl) {
|
|
|
global $db,$tables;
|
|
global $db,$tables;
|
|
|
|
|
|
|
|
- echo "\n<br>216: Querying :T ".$T." ext: ".$sql_ext ;//$sql_ext
|
|
|
|
|
|
|
+ echo "\n<br>216: from:".$last_tbl." Querying :T ".$T." ext: ".$sql_ext ;//$sql_ext
|
|
|
// echo "\n<br> las fou"
|
|
// echo "\n<br> las fou"
|
|
|
flush();
|
|
flush();
|
|
|
$res=$db->query($sql_ext) or die('211 blad '.$sql_ext);
|
|
$res=$db->query($sql_ext) or die('211 blad '.$sql_ext);
|