From c615937b29fbd204b7fe0b9d1938487f9262d778 Mon Sep 17 00:00:00 2001
From: pbarroca <pbarroca@afi-sa.fr>
Date: Mon, 24 Mar 2014 16:36:38 +0100
Subject: [PATCH] Code cleaning

---
 cosmogramme/php/classes/classe_sql.php | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/cosmogramme/php/classes/classe_sql.php b/cosmogramme/php/classes/classe_sql.php
index d62a90e750c..edc9fb786ad 100644
--- a/cosmogramme/php/classes/classe_sql.php
+++ b/cosmogramme/php/classes/classe_sql.php
@@ -145,16 +145,13 @@ class sql
 			? $this->statements[$table][$cols] 
 			: $this->statements[$table][$cols] = $this->createInsertPrepareStatement($table, $data);
 
-		foreach($data as $col => $valeur) {
-			$statement->bindValue(":$col", trim($valeur));
-		}
+		foreach($data as $col => $valeur)
+			$statement->bindValue(':' . $col, trim($valeur));
 
 		try	{
 			$result = $statement->execute();
 			return $this->hpdo->lastInsertId();
-		}
-		catch(PDOException $e)
-		{
+		} catch(PDOException $e) {
 			$this->traiteErreur($req,$e);
 			return false;
 		}
-- 
GitLab