Exemple #1
0
 /**
  * Returns the current max id.
  * @return int
  * @internal
  */
 public function getCurrentId()
 {
     $sql = 'SELECT value FROM ' . $this->table . ' WHERE name = ?';
     $id = $this->db->fetchOne($sql, array($this->name));
     if (!empty($id) || '0' === $id || 0 === $id) {
         return (int) $id;
     }
 }
Exemple #2
0
 public function delete()
 {
     $this->initDbIfNeeded();
     $table = $this->getTableName();
     $sql = "DELETE FROM {$table} WHERE `plugin_name` = ? and `user_login` = ?";
     $bind = array($this->pluginName, $this->userLogin);
     $this->db->query($sql, $bind);
 }
 public function delete()
 {
     $this->initDbIfNeeded();
     $table = $this->getTableName();
     $sql = "DELETE FROM {$table} WHERE `idsite` = ? and plugin_name = ?";
     $bind = array($this->idSite, $this->pluginName);
     $this->db->query($sql, $bind);
 }