|
|
@@ -125,10 +125,12 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
|
|
|
}
|
|
|
|
|
|
foreach($sql as $T => $rel) {
|
|
|
- $sql_t[$T]=" select * from ".$T." where ";
|
|
|
+ $sql_t[$T]=" select * from ".$T." where ( ";
|
|
|
foreach($rel['rel'] as $col=>$val) {
|
|
|
- $sql_t[$T].=" `".$col."` = '".$val." " ;
|
|
|
+ if( isset($sql_t_str[$T])) $sql_t_str[$T].=" or `".$col."` = '".$val." " ;
|
|
|
+ else $sql_t_str[$T].=" `".$col."` = '".$val." " ;
|
|
|
}
|
|
|
+ $sql_t[$T].=$sql_t_str[$T]." ) ";
|
|
|
//not loop
|
|
|
if( isset($hist_loop[$T])) {
|
|
|
foreach($hist_loop[$T] as $hist_rec) {
|
|
|
@@ -138,8 +140,9 @@ function dig_next($hist_loop,$prev_tbl,$prev_dig,$loop) {
|
|
|
}
|
|
|
//echo "sql";
|
|
|
//print_r($sql);
|
|
|
- echo "<br>sql_t";
|
|
|
+ echo "<br>sql_t <pre>";
|
|
|
print_r($sql_t);
|
|
|
+ echo "</pre>";
|
|
|
|
|
|
if( isset($sql_t)) {
|
|
|
foreach($sql_t as $T => $sql_ext) {
|