コード例 #1
0
ファイル: Sequence.php プロジェクト: FluentDevelopment/piwik
 /**
  * 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;
     }
 }
コード例 #2
0
ファイル: PluginSettingsTable.php プロジェクト: piwik/piwik
 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);
 }
コード例 #3
0
 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);
 }