Nextrek
Diff Revisions
235
vs
240
for /Android/SmartCharging/endPoints/LocalRepository.php
|
@@ -33,7 +33,7 @@ |
33 |
33 |
|
} |
34 |
34 |
|
|
35 |
35 |
|
$queryImgs = "INSERT INTO immagini_locali(id_locale, img) VALUES" . implode(',', $imgsToInsert); |
36 |
|
- |
echo "<br/>".$queryImgs."<br/>"; |
|
36 |
+ |
//echo "<br/>".$queryImgs."<br/>"; |
37 |
37 |
|
|
38 |
38 |
|
$this->db->exec($queryImgs); |
39 |
39 |
|
|
|
@@ -61,6 +61,33 @@ |
61 |
61 |
|
return $this->db->exec($query); |
62 |
62 |
|
} catch (PDOException $e) { |
63 |
63 |
|
echo $e->getMessage(); |
|
64 |
+ |
return -1; |
|
65 |
+ |
} |
|
66 |
+ |
} |
|
67 |
+ |
|
|
68 |
+ |
public function setLocalName($id_local, $name) { |
|
69 |
+ |
$query = "UPDATE locale |
|
70 |
+ |
SET nomelocale='".$name."'". |
|
71 |
+ |
"WHERE id=".$id_local; |
|
72 |
+ |
|
|
73 |
+ |
try { |
|
74 |
+ |
return $this->db->exec($query); |
|
75 |
+ |
} catch (PDOException $e) { |
|
76 |
+ |
echo $e->getMessage(); |
|
77 |
+ |
return -1; |
|
78 |
+ |
} |
|
79 |
+ |
} |
|
80 |
+ |
|
|
81 |
+ |
public function setLocalDescription($id_local, $description) { |
|
82 |
+ |
$query = "UPDATE locale |
|
83 |
+ |
SET descrizione='".$description."'". |
|
84 |
+ |
"WHERE id=".$id_local; |
|
85 |
+ |
|
|
86 |
+ |
try { |
|
87 |
+ |
return $this->db->exec($query); |
|
88 |
+ |
} catch (PDOException $e) { |
|
89 |
+ |
echo $e->getMessage(); |
|
90 |
+ |
return -1; |
64 |
91 |
|
} |
65 |
92 |
|
} |
66 |
93 |
|
|