src/Resource.php
public function delete() {
		if ($this->dbId()) {
			$this->db()->query('DELETE FROM `'.$this->table().'` WHERE `'.$this->idVar().'` = ?', [$this->dbId()]);
		} else {
			throw new Exception('Cannot delete. No ID was given.');
		}
		return $this;
	}
public function delete() {
		if ($this->dbId()) {
			$this->db()->query('DELETE FROM `'.$this->table().'` WHERE `'.$this->idVar().'` = ?', [$this->dbId()]);
		} else {
			throw new Exception('Cannot delete. No ID was given.');
		}
		return $this;
	}
public function delete ( ) { if ( $ this -> dbId ( ) ) { $ this -> db ( ) -> query ( 'DELETE FROM `' . $ this -> table ( ) . '` WHERE `' . $ this -> idVar ( ) . '` = ?' , [ $ this -> dbId ( ) ] ) ; } else { throw new Exception ( 'Cannot delete. No ID was given.' ) ; } return $ this ; }
Delete a row in a table
Delete a row in a table