diff --git a/Internal/package-database/DB.php b/Internal/package-database/DB.php index ddcc1793..9aaef051 100755 --- a/Internal/package-database/DB.php +++ b/Internal/package-database/DB.php @@ -103,13 +103,20 @@ class DB extends Connection private $transStart , $transError , $duplicateCheck , $duplicateCheckUpdate ; private $joinType , $joinTable , $unionQuery = NULL, $caching = [], $jsonDecode ; private $hashId , $hashIdColumn, $isUpdate = false , $unset = [], $object ; - private $from , $results , $returnQueryType , $paging = 'row' ; + private $preselect , $results , $returnQueryType , $paging = 'row' ; /** * Callable talking queries. */ use CallableTalkingQueries; + public function preselect($preselect) + { + $this->preselect = $preselect . ' '; + + return $this; + } + /** * Defines SQL SELECT * @@ -759,7 +766,8 @@ public function get(string $table = NULL, string $return = 'object') { $this->tableName = $table = $this->addPrefixForTableAndColumn($table, 'table'); - $finalQuery = 'SELECT ' . + $finalQuery = $this->preselect . + 'SELECT ' . $this->distinct . $this->highPriority . $this->straightJoin . $this->smallResult. $this->bigResult . $this->bufferResult . $this->cache . $this->calcFoundRows. $this->buildSelectClause() . @@ -3229,8 +3237,8 @@ protected function resetSelectQueryVariables() $this->bufferResult = NULL; $this->cache = NULL; $this->calcFoundRows = NULL; + $this->preselect = NULL; $this->select = NULL; - $this->from = NULL; $this->table = NULL; $this->where = NULL; $this->groupBy = NULL; diff --git a/zeroneed.php b/zeroneed.php index 62dbd594..e4d1e2c7 100755 --- a/zeroneed.php +++ b/zeroneed.php @@ -30,4 +30,4 @@ | */ -ZN\ZN::run('FE', '8.3.3', 'Mustafa Kemal Atatürk'); +ZN\ZN::run('FE', '8.4.0', 'Mustafa Kemal Atatürk');