From b8fb7008333b3ee281407669d50118fe0dcc571a Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 30 Apr 2002 18:34:03 +0000 Subject: [PATCH] try to make it work again --- ChangeLog | 3 +++ tbl_qbe.php3 | 23 +++++++++-------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d63debc6c..28de10730f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-04-30 Marc Delisle + * tbl_qbe.php3, try to make it work again + 2002-04-30 Alexander M. Turek * lang/german.inc.php3: Clarification ($strFlushTable). diff --git a/tbl_qbe.php3 b/tbl_qbe.php3 index 0f48ed1b6b..5a7ed49932 100755 --- a/tbl_qbe.php3 +++ b/tbl_qbe.php3 @@ -708,8 +708,8 @@ if (isset($Field) && count($Field) > 0) { $rest = array(); $found = array(); $rel_work = FALSE; - $ex = 0; - $hit = 0; + //$ex = 0; +// $hit = 0; // we only start this if we have fields, otherwise it would be dumb while (list(, $value) = each($Field)) { @@ -729,7 +729,8 @@ if (isset($Field) && count($Field) > 0) { $wtable = explode('.', urldecode($Field[$x])); $ctable = str_replace('`', '', $wtable[0]); if (!empty($Field[$x]) && !empty($Criteria[$x])) { - if (isset($where[$ctable]) && $where[$ctable] != '=') { +// if (isset($where[$ctable]) && $where[$ctable] != '=') { + if (empty($where[$ctable]) || $where[$ctable] != '=') { $where[$ctable] = substr($Criteria[$x], 0, 1); } } @@ -786,26 +787,20 @@ if (isset($Field) && count($Field) > 0) { } else { // remember that we found more than one because this means we // need to refine more - $hit = 2; + //$hit = 2; } // end if.. else... while (list($key, $value) = each($wheretabs)) { if ($row['wer'] == $key) { $master = $row['wer']; - $ex = 1; + //$ex = 1; break; } } // end while reset($wheretabs); } // end while - if ($ex == 1 || $hit != 2) { - // if $ex is not 1 then obviously none of the tables that are used - // in the whereclause could be found - that means that using left - // joins doesn't make much sense anyway - - if ($master != '') { - $qry_from = PMA_backquote($master); - } + if ($master != '') { + $qry_from = PMA_backquote($master); // now we want one Array that has all tablenames but master while (list(, $value) = each($alltabs)) { @@ -908,7 +903,7 @@ if (isset($Field) && count($Field) > 0) { $qry_from = ereg_replace(', $', '', $qry_from); $qry_from .= $ljm . $lj; - } // end $ex == 1 (testing if it is worth the pain) + } // end if ($master != '') } // end rel work and $alltabs > 0