From e960142185d5182988ed9ceae4527fb1e1b28bdd Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 5 Jul 2007 12:26:42 +0000 Subject: [PATCH] previous fix was incompatible with mysql extension --- libraries/common.lib.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 6f0510f71..f36e3def1 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2228,8 +2228,14 @@ if (typeof(window.parent) != 'undefined' } } - // do not use a table alias in a condition - if ($meta->table != $meta->orgtable) { + // Do not use a table alias in a condition. + // Test case is: + // select * from galerie x WHERE + //(select count(*) from galerie y where y.datum=x.datum)>1 + // + // But orgtable is present only with mysqli extension so the + // fix is only for mysqli. + if (isset($meta->orgtable) && $meta->table != $meta->orgtable) { $meta->table = $meta->orgtable; }