Correction fetch
This commit is contained in:
parent
bc95bad2b3
commit
8ccfe5a08f
|
@ -702,14 +702,12 @@
|
|||
$requestS = SQLBuilder::SELECT($selectTables)."\n";
|
||||
|
||||
|
||||
|
||||
/* [2] On rédige la clause FROM
|
||||
========================================================*/
|
||||
/* (1) Table locale */
|
||||
$requestS .= SQLBuilder::FROM( array_keys($selectTables) )."\n";
|
||||
|
||||
|
||||
|
||||
/* [5] On rédige la clause WHERE/AND
|
||||
=========================================================*/
|
||||
/* (0) On initialise le conteneur des variables "bindés" */
|
||||
|
@ -730,9 +728,11 @@
|
|||
}
|
||||
|
||||
/* (2) On ajoute les jointures */
|
||||
foreach($this->joined as $localField=>$rows)
|
||||
foreach($this->joined as $localField=>$rows){
|
||||
if( $c == 0 ) $requestS .= 'WHERE '.$this->schema['table'].'.'.$localField.' = '.$this->schema['columns'][$localField]['references'][0].'.'.$this->schema['columns'][$localField]['references'][1]."\n";
|
||||
else $requestS .= 'AND '.$this->schema['table'].'.'.$localField.' = '.$this->schema['columns'][$localField]['references'][0].'.'.$this->schema['columns'][$localField]['references'][1]."\n";
|
||||
$c++;
|
||||
}
|
||||
|
||||
/* (3) On ajoute les conditions des jointures */
|
||||
foreach($this->joined as $rows)
|
||||
|
|
|
@ -433,17 +433,17 @@
|
|||
//
|
||||
// ->delete();
|
||||
//
|
||||
// $module = Table::get('module')
|
||||
// ->whereName([ $_SESSION['WAREHOUSE']['modules'], Rows::COND_IN ]);
|
||||
//
|
||||
// $chip = Table::get('chip')
|
||||
// ->select('*');
|
||||
//
|
||||
// $module_merge = Table::get('module_merge')
|
||||
// ->join('id_module', $module)
|
||||
$module = Table::get('module')
|
||||
->whereName([ $_SESSION['WAREHOUSE']['modules'], Rows::COND_IN ]);
|
||||
|
||||
$chip = Table::get('chip')
|
||||
->select('*');
|
||||
|
||||
$module_merge = Table::get('module_merge')
|
||||
->join('id_module', $module);
|
||||
// ->join('id_chip', $chip);
|
||||
//
|
||||
// var_dump($module_merge->fetch());
|
||||
|
||||
var_dump($module_merge->fetch());
|
||||
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue