diff options
| author | polo <ordipolo@gmx.fr> | 2023-09-03 02:45:17 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2023-09-03 02:45:17 +0200 |
| commit | 78439b6a178e238ab8fb73d25567a85df78d6681 (patch) | |
| tree | 219181bc81bff750d9ec3a44c5ccb2a3028694e4 /src/model/Model.php | |
| parent | 45262760a7d575a9d612cc2056e66bf105e43df8 (diff) | |
| download | AppliGestionPHP-78439b6a178e238ab8fb73d25567a85df78d6681.tar.gz AppliGestionPHP-78439b6a178e238ab8fb73d25567a85df78d6681.tar.bz2 AppliGestionPHP-78439b6a178e238ab8fb73d25567a85df78d6681.zip | |
section 3 prestas non vendues
Diffstat (limited to 'src/model/Model.php')
| -rw-r--r-- | src/model/Model.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/Model.php b/src/model/Model.php index 4c4a80c..07826af 100644 --- a/src/model/Model.php +++ b/src/model/Model.php | |||
| @@ -183,7 +183,7 @@ abstract class Model extends DB | |||
| 183 | return($this->execQuery('SELECT * FROM ' . $this->table)->fetchAll()); // fonctionne aussi sans le point virgule dans le SQL!! | 183 | return($this->execQuery('SELECT * FROM ' . $this->table)->fetchAll()); // fonctionne aussi sans le point virgule dans le SQL!! |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | public function findById() // obtenir une entrée avec son ID | 186 | public function findById() // obtenir une entrée grace à son ID |
| 187 | { | 187 | { |
| 188 | return($this->execQuery('SELECT * FROM ' . $this->table . ' WHERE id = ' . $this->ID)->fetch()); | 188 | return($this->execQuery('SELECT * FROM ' . $this->table . ' WHERE id = ' . $this->ID)->fetch()); |
| 189 | } | 189 | } |
| @@ -191,7 +191,7 @@ abstract class Model extends DB | |||
| 191 | { | 191 | { |
| 192 | if($this->table == 'prestations') | 192 | if($this->table == 'prestations') |
| 193 | { | 193 | { |
| 194 | // à l'occaz, rendre abstraite la classe Prestations | 194 | // à l'occaz, créer une classe NonVendue et rendre Prestations abstraite |
| 195 | echo 'erreur: ne pas appeler Model::getDetailsByIdPresta() si la table ciblée est "prestations".'; | 195 | echo 'erreur: ne pas appeler Model::getDetailsByIdPresta() si la table ciblée est "prestations".'; |
| 196 | return 0; | 196 | return 0; |
| 197 | } | 197 | } |
