|
|
@@ -107,7 +107,7 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time) {
|
|
|
global $db,$tables;
|
|
|
$loop++;
|
|
|
echo "\n<hr>###LOOP ".$loop;
|
|
|
- if($loop>50) die(' loop '.$loop);
|
|
|
+ if($loop>10) die(' loop '.$loop);
|
|
|
//detect next ref tbls
|
|
|
$sql = array();
|
|
|
$sql_RELAND = array();
|
|
|
@@ -163,8 +163,8 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop,$hist_time) {
|
|
|
$sql_rel_and_sql[$T][$z_rel_and_name]="select * from ".$T." where ( ";
|
|
|
$and=0;
|
|
|
foreach($z_rel_and_name_col as $z_rel_and_name_cur=>$z_rel_and_name_col_to) {
|
|
|
- if( $and==1) $sql_rel_and_sql[$T][$z_rel_and_name].=" and SOUNDEX(`".$z_rel_and_name_cur."`) = SOUNDEX('.".$z_rel_and_name_col_to."') and `".$z_rel_and_name_cur."` not like '%-xxx-%' " ;
|
|
|
- else $sql_rel_and_sql[$T][$z_rel_and_name].=" SOUNDEX(`".$z_rel_and_name_cur."`) = SOUNDEX('".$z_rel_and_name_col_to."') and `".$z_rel_and_name_cur."` not like '%-xxx-%' " ;
|
|
|
+ if( $and==1) $sql_rel_and_sql[$T][$z_rel_and_name].=" and SOUNDEX(`".$z_rel_and_name_cur."`) = SOUNDEX('.".$z_rel_and_name_col_to."') and `".$z_rel_and_name_cur."` not like '%--%' " ;
|
|
|
+ else $sql_rel_and_sql[$T][$z_rel_and_name].=" SOUNDEX(`".$z_rel_and_name_cur."`) = SOUNDEX('".$z_rel_and_name_col_to."') and `".$z_rel_and_name_cur."` not like '%--%' " ;
|
|
|
$and=1;
|
|
|
}
|
|
|
$sql_rel_and_sql[$T][$z_rel_and_name].=" ) " ;
|
|
|
@@ -299,7 +299,7 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop) {
|
|
|
//rel dzieci
|
|
|
if(isset($tables['Z'][$T]['ref'])) {
|
|
|
echo "<br>#296 try to ref tables <pre>";
|
|
|
- print_r($tables[$T]['ref']);
|
|
|
+ print_r($tables['Z'][$T]['ref']);
|
|
|
echo "</pre>";
|
|
|
|
|
|
foreach($tables['Z'][$T]['ref'] as $ref_id => $ref_table) {
|
|
|
@@ -322,7 +322,7 @@ function dig_arr_cur($hist_loop,$T,$sql_ext,$hist_time,$loop) {
|
|
|
}
|
|
|
if(isset($tables['Z'][$T]['backref'])) {
|
|
|
echo "<br>#296 try to backref tables <pre>";
|
|
|
- print_r($tables[$T]['backref']);
|
|
|
+ print_r($tables['Z'][$T]['backref']);
|
|
|
echo "</pre>";
|
|
|
|
|
|
|