def connection
@conn = Mysql.new(@host, @username, @password, @db);
end
def exequery sql
st = @conn.prepare(sql);
st.execute; return st.fetch;
end
end
a = ConnMysql.new('localhost','root','livedoor2008','depot_development');
a.connection;
sql ="select * from users";
result = a.exequery(sql); puts result.join(',');