ミームの死骸を待ちながら

We are built as gene machines and cultured as meme machines, but we have the power to turn against our creators. We, alone on earth, can rebel against the tyranny of the selfish replicators. - Richard Dawkins "Selfish Gene"

We are built as gene machines and cultured as meme machines, but we have the power to turn against our creators.
We, alone on earth, can rebel against the tyranny of the selfish replicators.
- Richard Dawkins "Selfish Gene"

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