这段代码到底有什么问题?以及如何运行这段代码?由于我是红宝石新手,请彻底解释一下。请帮忙!!!
my_connection_base.rb
类 MyConnectionBase < ActiveRecord::Base
client = Mysql2::Client.new(:host => "localhost", :database => "flipkart_project_development", :table => "users" , :username => "flipkart_project", :password => "mypass")
结果 = client.query("SELECT * FROM users")
把结果
结尾