@@ -152,14 +152,14 @@ discard block |
||
| 152 | 152 | public function get() { |
| 153 | 153 | $values = []; |
| 154 | 154 | $datas = []; |
| 155 | - $requete = $this->req_beginning . implode(",", $this->select_champ) . " FROM " . implode(",", $this->table); |
|
| 155 | + $requete = $this->req_beginning.implode(",", $this->select_champ)." FROM ".implode(",", $this->table); |
|
| 156 | 156 | |
| 157 | 157 | if ((!empty($this->conditions)) || (!empty($this->conditions_table))) { |
| 158 | - $values = array_combine(str_replace(".", "", $this->champs),$this->value); |
|
| 158 | + $values = array_combine(str_replace(".", "", $this->champs), $this->value); |
|
| 159 | 159 | |
| 160 | 160 | $count = count($this->champs); |
| 161 | 161 | |
| 162 | - for ($i=0 ; $i<$count ; $i++) { |
|
| 162 | + for ($i = 0; $i < $count; $i++) { |
|
| 163 | 163 | $datas[] = $this->champs[$i]." ".$this->conditions[$i]." :".str_replace(".", "", $this->champs[$i])." ".$this->closure[$i]." "; |
| 164 | 164 | } |
| 165 | 165 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $datas[] = $cond; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | - $requete .= " WHERE ". implode(" ", $datas); |
|
| 170 | + $requete .= " WHERE ".implode(" ", $datas); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | $requete .= $this->order_by; |
@@ -186,15 +186,15 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | $datas = []; |
| 188 | 188 | $count = count($this->champs); |
| 189 | - for ($i=0 ; $i<$count ; $i++) { |
|
| 189 | + for ($i = 0; $i < $count; $i++) { |
|
| 190 | 190 | $datas[] = $this->champs[$i]."=:".$this->champs[$i]; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | //si on a des conditions alors on sera dans un insert |
| 194 | - $requete = $this->req_beginning . implode(",", $this->table) . " SET " . implode(", ", $datas); |
|
| 194 | + $requete = $this->req_beginning.implode(",", $this->table)." SET ".implode(", ", $datas); |
|
| 195 | 195 | |
| 196 | 196 | if (!empty($this->conditions)) { |
| 197 | - $requete .= " WHERE " . implode(" ", $this->conditions); |
|
| 197 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | $this->prepare($requete, $values); |
@@ -205,10 +205,10 @@ discard block |
||
| 205 | 205 | * fonction utilisée pour finir un delete |
| 206 | 206 | */ |
| 207 | 207 | public function del() { |
| 208 | - $requete = $this->req_beginning . implode(",", $this->table); |
|
| 208 | + $requete = $this->req_beginning.implode(",", $this->table); |
|
| 209 | 209 | |
| 210 | 210 | if (!empty($this->conditions)) { |
| 211 | - $requete .= " WHERE " . implode(" ", $this->conditions); |
|
| 211 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | $this->query($requete); |