ORM: Aucune gestion des types de retours 'format()' des tables de jointures
This commit is contained in:
parent
0ae728f460
commit
9fca3a0546
|
@ -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]);
|
||||
|
||||
|
||||
|
|
|
@ -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++;
|
||||
|
|
|
@ -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', [
|
||||
|
|
Loading…
Reference in New Issue