MySQL/Rubyの基本の書き方
Rubyスクリプト内にmysqlをrequireし、クエリ文を埋め込んで使用する。
クエリ文はMy自体で試行錯誤し、できたものをコピペ
require 'mysql'
begin
myh = Mysql.init
myh.options (Mysql::SET_CHARSET_NAME, 'utf8')
#日本語に対応させる
myh.connect('localhost', 'root', '', 'employee')
s = myh.query("MySQLクエリ文")
#ここで、st = myh.prepare("クエリ(?使って)")でも
s.each_hashとかしてprintfで出力
#s = st.execute(ARGV) これがプレースホルダ
myh.close #st.close
end