Changes for clojure.contrib.sql/delete-rows

zkim on Sun, 26 Sep 2010
;;
;; 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
zkim on Wed, 14 Jul 2010
;
; 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](http://en.wikibooks.org/wiki/Clojure_Programming/Examples/JDBC_Examples#DELETE).