I wrote 'name-based parameter binding' for DBI.
name-based placeholder is /\?(\w+)\?/
EXAMPLE:
params = { :key1 => "foo", :key2 =>
"bar" }
# ex1
dbh.execute("SELECT * FROM table WHERE key1=?key1?
and key2=?key2?",params)
# ex2 equivalent ex1
dbh.execute("SELECT * FROM table WHERE key2=?key2?
and key1=?key1?",params)
_______________________________________________
Ruby-dbi-next mailing list
Ruby-dbi-next rubyforge.org
h
ttp://rubyforge.org/mailman/listinfo/ruby-dbi-next |