ORM: Aucune gestion des types de retours 'format()' des tables de jointures

This commit is contained in:
xdrm-brackets 2016-07-25 10:53:24 +02:00
parent c66358ebf7
commit 23c62e940f
3 changed files with 9 additions and 5 deletions

View File

@ -880,8 +880,8 @@
/* (2) On compose la requête */
$requestString = SQLBuilder::BUILD($requestS).';';
var_dump($requestS);
var_dump($requestString);
var_dump($bound);
/* (3) On prépare la requête */
$request = Database::getPDO()->prepare($requestString);
@ -973,7 +973,8 @@
else if( $existingColumns[$index]['type'] == 'float' )
$formatted[$i][$index] = floatval( $value );
}else // Si pas dans le schéma, on le retire
// Si pas non plus une aggrégation et si indice numérique, on le retire
}else if( !preg_match('/^agg_.+/', $index) && is_numeric($index) )
unset($formatted[$i][$index]);

View File

@ -274,7 +274,10 @@
/* (4) On ajoute l'alias */
$sql .= "$fieldStr";
if( isset($select[0]) && !is_null($select[0]) )
$sql .= "$fieldStr as agg_$field";
else
$sql .= "$fieldStr";
$c++;

View File

@ -490,12 +490,12 @@
$mcm = Table::get('machine_cluster_merge')
->join('id_machine', $m);
$a = Table::get('action_merge')
$am= Table::get('action_merge')
->join('id_source', $ucm)
->join('id_target', $mcm)
->select('id_action', Rows::SEL_CONCAT, Rows::SEL_DISTINCT);
var_dump($a->fetch());
var_dump($am->fetch());
// $a = new ModuleRequest('authentificationDefault/warehouse', [