Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -62,6 +62,11 @@ class _Db extends Table
|
||||
*/
|
||||
public $keyField = NULL;
|
||||
|
||||
/**
|
||||
* @brief Group by key
|
||||
*/
|
||||
public $groupBy = NULL;
|
||||
|
||||
/**
|
||||
* @brief The database we will query against
|
||||
*/
|
||||
@@ -320,9 +325,10 @@ class _Db extends Table
|
||||
}
|
||||
}
|
||||
$count = $count->first();
|
||||
$selectPrefix = ( $this->groupBy ) ? '' : $this->table . '.*, ';
|
||||
|
||||
/* Now get column headers */
|
||||
$query = $this->db->select( ( \count( $selects ) ) ? $this->table . '.*, ' . implode( ', ', $selects ) : '*', $this->table, NULL, NULL, array( 0, 1 ) );
|
||||
$query = $this->db->select( ( \count( $selects ) ) ? $selectPrefix . implode( ', ', $selects ) : '*', $this->table, NULL, NULL, array( 0, 1 ), $this->groupBy );
|
||||
|
||||
if ( \count( $this->joins ) )
|
||||
{
|
||||
@@ -380,11 +386,12 @@ class _Db extends Table
|
||||
/* Run query */
|
||||
$rows = array();
|
||||
$select = $this->db->select(
|
||||
( \count( $selects ) ) ? $this->table . '.*, ' . implode( ', ', $selects ) : '*',
|
||||
( \count( $selects ) ) ? $selectPrefix . implode( ', ', $selects ) : '*',
|
||||
$this->table,
|
||||
$where,
|
||||
$orderBy,
|
||||
array( ( $this->limit * ( $this->page - 1 ) ), $limit )
|
||||
array( ( $this->limit * ( $this->page - 1 ) ), $limit ),
|
||||
$this->groupBy
|
||||
);
|
||||
|
||||
if ( $this->index )
|
||||
|
||||
Reference in new issue
Block a user