; , rb19-mysql.
my = Mysql.new(hostname, username, password, databasename)
st = my.prepare("insert into tblname (col1,col2,col3) values (?,?,?)")
st.execute("abc",123,Time.now)
st.prepare("select col1,col2,col3 from tblname")
st.execute
st.fetch
st.close
, -, , - . , MacPorts - ? , .
Also (and I know this seems like a religion to some people), you might consider dropping the MacPort version and just grab the MySql gem. For some reason, using gems was much more enjoyable for me.
Hope this helps - good luck!
source
share