medoo::delete PHP 메소드

delete() 공개 메소드

public delete ( $table, $where )
    public function delete($table, $where)
    {
        return $this->exec('DELETE FROM "' . $table . '"' . $this->where_clause($where));
    }

Usage Example

예제 #1
0
 /**
  * Delete record
  * @param int|string $id
  * @return bool True in case of success
  * @throws \Exception
  */
 public function delete($id, $extCall = false)
 {
     $this->gp->checkAccess(__FUNCTION__, $extCall);
     $parsed_arg = $this->checkArguments($id);
     if (is_numeric($parsed_arg) !== true) {
         throw new \Exception("Argumunt is not a string", 6024);
     }
     if ($this->isImplement("FileManage")) {
         $this->deleteFile($parsed_arg);
     }
     if (EMA_DEBUG && EMA_LOG_SQL_QUERIES) {
         $this->logDeleteQuery($this->dbTable, array("id" => $parsed_arg));
     }
     $dbData = $this->dbConnection->delete($this->dbTable, array("id" => $parsed_arg));
     if (is_numeric($dbData) === false || $dbData < 1) {
         $this->throwMysqlError();
     }
     if ($this->isImplement("Sitemap")) {
         $this->generateSitemap();
     }
     if ($this->isImplement("RssFeed")) {
         $this->rssFeedUpdate();
     }
     return true;
 }
All Usage Examples Of medoo::delete