|
|
@@ -165,12 +165,13 @@ 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 '%--%' " ;
|
|
|
+ if( $and==1) $sql_rel_and_sql[$T][$z_rel_and_name].=" and `".$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 '%--%' " ;
|
|
|
if($z_rel_and_name_cur=='miejscowosc') $sql_rel_and_sql[$T][$z_rel_and_name].=" and `miejscowosc` not like '' " ;
|
|
|
if($z_rel_and_name_cur=='A_ulica') $sql_rel_and_sql[$T][$z_rel_and_name].=" and `A_ulica` not like '' " ;
|
|
|
if($z_rel_and_name_cur=='ulica') $sql_rel_and_sql[$T][$z_rel_and_name].=" and `ulica` not like '' " ;
|
|
|
if($z_rel_and_name_cur=='kodPocztowy') $sql_rel_and_sql[$T][$z_rel_and_name].=" and `kodPocztowy` not like '' " ;
|
|
|
+ if($z_rel_and_name_cur=='budynek') $sql_rel_and_sql[$T][$z_rel_and_name].=" and `budynek` like '".$z_rel_and_name_cur."' " ;
|
|
|
$and=1;
|
|
|
}
|
|
|
$sql_rel_and_sql[$T][$z_rel_and_name].=" ) " ;
|