@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * pour intialiser la ou les clauses where d'une requete |
249 | 249 | */ |
250 | 250 | public function where($champ, $cond, $champ_test, $closure = null) { |
251 | - if ( $closure === null) { |
|
251 | + if ($closure === null) { |
|
252 | 252 | $this->conditions[] = $champ.$cond.$champ_test; |
253 | 253 | } |
254 | 254 | else { |
@@ -264,10 +264,10 @@ discard block |
||
264 | 264 | * fonction qui permet de récupérer un select fait sur une table |
265 | 265 | */ |
266 | 266 | public function get() { |
267 | - $requete = $this->req_beginning . implode(",", $this->champs) . " FROM " . implode(",", $this->table); |
|
267 | + $requete = $this->req_beginning.implode(",", $this->champs)." FROM ".implode(",", $this->table); |
|
268 | 268 | |
269 | 269 | if ($this->conditions) { |
270 | - $requete .= " WHERE ". implode(" ", $this->conditions); |
|
270 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | $this->unsetQueryBuilder(); |
@@ -281,15 +281,15 @@ discard block |
||
281 | 281 | $values = array_combine($this->champs, $this->value); |
282 | 282 | |
283 | 283 | $datas = []; |
284 | - for ($i=0 ; $i<count($this->champs) ; $i++) { |
|
284 | + for ($i = 0; $i < count($this->champs); $i++) { |
|
285 | 285 | $datas[] = $this->champs[$i]."=:".$this->champs[$i]; |
286 | 286 | } |
287 | 287 | |
288 | 288 | //si on a des conditions alors on sera dans un insert |
289 | - $requete = $this->req_beginning . implode(",", $this->table) . " SET " . implode(", ", $datas); |
|
289 | + $requete = $this->req_beginning.implode(",", $this->table)." SET ".implode(", ", $datas); |
|
290 | 290 | |
291 | 291 | if ($this->conditions) { |
292 | - $requete .= " WHERE " . implode(" ", $this->conditions); |
|
292 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | $this->prepare($requete, $values); |
@@ -300,10 +300,10 @@ discard block |
||
300 | 300 | * fonction utilisée pour finir un delete |
301 | 301 | */ |
302 | 302 | public function del() { |
303 | - $requete = $this->req_beginning . implode(",", $this->table); |
|
303 | + $requete = $this->req_beginning.implode(",", $this->table); |
|
304 | 304 | |
305 | 305 | if ($this->conditions) { |
306 | - $requete .= " WHERE " . implode(" ", $this->conditions); |
|
306 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | $this->query($requete); |