;;
;; the first line allows us to say sql/with-connection instead of
;; clojure.contrib.sql/with-connection
;;
(require '[clojure.contrib.sql :as sql])
(defn delete-blog
"Deletes a blog entry given the id"
[id]
(sql/with-connection db
(sql/delete-rows :blogs ["id=?" id])))
;; From http://en.wikibooks.org/wiki/Clojure_Programming/Examples/JDBC_Examples#DELETE
;;
;; the first line allows us to say sql/with-connection instead of
;; clojure.contrib.sql/with-connection
;;
(require '[clojure.contrib.sql :as sql])
(defn delete-blog
"Deletes a blog entry given the id"
[id]
(sql/with-connection db
(sql/delete-rows :blogs ["id=?" id])))
;; From http://en.wikibooks.org/wiki/Clojure_Programming/Examples/JDBC_Examples#DELETE