2016-07-19 09:27:35 +00:00
|
|
|
<?php
|
|
|
|
|
2016-10-18 14:03:03 +00:00
|
|
|
namespace database\repo;
|
|
|
|
use \database\core\Database;
|
|
|
|
use \database\core\Repo;
|
2016-10-18 17:09:47 +00:00
|
|
|
use \error\core\Error;
|
2016-10-18 14:03:03 +00:00
|
|
|
use \orm\core\Table;
|
|
|
|
use \orm\core\Rows;
|
2016-07-19 09:27:35 +00:00
|
|
|
|
|
|
|
class chip extends parentRepo{
|
|
|
|
|
|
|
|
protected static function table_name(){ static $table_name = 'chip'; return $table_name; }
|
|
|
|
|
|
|
|
|
2016-07-24 10:00:49 +00:00
|
|
|
/* RENVOIE LA LISTE DES CARTES/PUCES DISPONIBLES EN FONCTION DES MODULES DE L'ENTREPOT
|
|
|
|
*
|
|
|
|
* @return chips<Array> Liste des puces/cartes disponibles
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public static function getAll($id_warehouse){
|
|
|
|
/* [1] On récupère les modules de l'entrepot courant
|
|
|
|
=========================================================*/
|
2016-07-24 23:14:35 +00:00
|
|
|
$module_merge = Table::get('module_merge')
|
|
|
|
->whereIdWarehouse(7);
|
|
|
|
|
2016-07-24 10:18:30 +00:00
|
|
|
|
|
|
|
$chip = Table::get('chip')
|
2016-07-24 23:14:35 +00:00
|
|
|
->join('id_module', $module_merge)
|
2016-07-24 10:18:30 +00:00
|
|
|
->select('*');
|
|
|
|
|
2016-07-24 10:00:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* [2] On retourne le résultat
|
|
|
|
=========================================================*/
|
2016-07-24 23:14:35 +00:00
|
|
|
return $chip->fetch();
|
2016-07-24 10:00:49 +00:00
|
|
|
}
|
2016-07-19 09:27:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|