projects
/
Pman.Base
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8056a0c
)
pdo fix as _query is private
author
Alan Knowles
<alan@roojs.com>
Wed, 2 Dec 2020 06:52:25 +0000
(14:52 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 2 Dec 2020 06:52:25 +0000
(14:52 +0800)
Pman/Roo.php
patch
|
blob
|
history
diff --git
a/Pman/Roo.php
b/Pman/Roo.php
index
4dfffb1
..
6363917
100644
(file)
--- a/
Pman/Roo.php
+++ b/
Pman/Roo.php
@@
-260,8
+260,13
@@
class Pman_Roo extends Pman
//DB_DataObject::debugLevel(1);
// count with multiple joins and no conditions can be quite slow - so if there are no conditions - just remove the joins from the count.
$xx = clone($x);
//DB_DataObject::debugLevel(1);
// count with multiple joins and no conditions can be quite slow - so if there are no conditions - just remove the joins from the count.
$xx = clone($x);
- if (empty($xx->_query['condition']) && !empty($xx->_join)) {
+ $old_where = $x->whereAdd();
+ if (empty($old_where )) {
$xx->_join = '';
$xx->_join = '';
+ } else {
+ $x->whereAdd($old_where);
+ $xx=clone($x);
+
}
$total = $xx->count($this->countWhat);
}
$total = $xx->count($this->countWhat);