From 00ef03de7853dbceeb40a8e54028a20cf8f15ce3 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 7 Nov 2016 19:42:15 +0100 Subject: [PATCH] Fix Rows (alias was '*' when selecting '*') --- build/orm/core/Rows.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/orm/core/Rows.php b/build/orm/core/Rows.php index d139263..75de9df 100644 --- a/build/orm/core/Rows.php +++ b/build/orm/core/Rows.php @@ -332,7 +332,7 @@ foreach($this->schema['columns'] as $f=>$c) if( !isset($this->select[$f]) ) - $this->select[$f] = [$func, $distinct, $alias]; + $this->select[$f] = [$func, $distinct, $f]; /* (2) Si aucun SELECT pour ce champ, on le crée */ }else{ @@ -985,6 +985,7 @@ /* (2) On compose la requête */ $requestString = SQLBuilder::BUILD($requestS).';'; + // var_dump($requestString); /* (3) On prépare la requête */ $request = DatabaseDriver::getPDO($this->driver)->prepare($requestString);