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