Subversion Repository Public Repository

Nextrek

Diff Revisions 242 vs 250 for /Android/SmartCharging/endPoints/LocalRepository.php

Diff revisions: vs.
  @@ -118,6 +118,19 @@
118 118 echo $e->getMessage();
119 119 }
120 120 }
121 +
122 + public function addImage($id_local, $img) {
123 + $sql = "INSERT INTO immagini_locali(id_locale, img)
124 + VALUES (".$id_local.",'".$img."')";
125 +
126 + try {
127 + $this->db->exec($sql);
128 + return 0;
129 + } catch (PDOException $e) {
130 + echo $e->getMessage();
131 + return 1;
132 + }
133 + }
121 134 }
122 135
123 136 ?>