|
|
@@ -304,7 +304,7 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop) {
|
|
|
$res=$db->query($sql_ext) or die('211 blad '.$sql_ext);
|
|
|
while($h=$db->fetch($res)) {
|
|
|
echo "\n<br> #149 found ".$h->ID;
|
|
|
- echo "<pre>"; print_r($h); echo "</pre>";
|
|
|
+ // echo "<pre>"; print_r($h); echo "</pre>";
|
|
|
$hist_loop[$T][]=$h;
|
|
|
$hist_time[][$T]=$sql_ext;
|
|
|
$hist_time[][$T]=$h;
|
|
|
@@ -313,9 +313,9 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop) {
|
|
|
dig_next($hist_loop, $tables['Z'][$T],$h,$loop,$hist_time);
|
|
|
//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>";
|
|
|
- print_r($tables['Z'][$T]['ref']);
|
|
|
- echo "</pre>";
|
|
|
+ // echo "<br>#296 try to ref tables for T ".$T."<pre>";
|
|
|
+ // print_r($tables['Z'][$T]['ref']);
|
|
|
+ // echo "</pre>";
|
|
|
|
|
|
foreach($tables['Z'][$T]['ref'] as $ref_id => $ref_table) {
|
|
|
$sql_ref=" select REMOTE_PRIMARY_KEY from `CRM__#REF_TABLE__".$ref_id."` where `PRIMARY_KEY`=".$h->ID." ";
|
|
|
@@ -337,9 +337,9 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop) {
|
|
|
|
|
|
} else echo "#322 not ref to ".$T;
|
|
|
if(isset($tables['Z'][$T]['backref'])) {
|
|
|
- echo "<br>#296 try to backref tables T ".$T."<pre>";
|
|
|
- print_r($tables['Z'][$T]['backref']);
|
|
|
- echo "</pre>";
|
|
|
+ //echo "<br>#296 try to backref tables T ".$T."<pre>";
|
|
|
+ // print_r($tables['Z'][$T]['backref']);
|
|
|
+ //echo "</pre>";
|
|
|
|
|
|
|
|
|
foreach($tables['Z'][$T]['backref'] as $ref_id => $ref_table) {
|