| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
g6d7
10年前发布

Ruby 连接到 MySQL 并执行SQL查询

require 'mysql'    m = Mysql.new("localhost","ruby","secret","maillist")  r = m.query("SELECT * FROM people ORDER BY name")  r.each_hash do |f|    print "#{f['name']} - #{f['email']}"  end