Slide 32
Slide 32 text
w 3VCZΦϒδΣΫτܦ༝Ͱ.Z42-Λૢ࡞͢Δ
ΫϥΠΞϯτͱͳΔυϥΠό(FN
require "mysql2"
client = Mysql2::Client.new(
:host => "localhost", :username => "root"
)
results = client.query(
"SELECT * FROM users WHERE group=‘githubbers'"
)
results.each do |row|
puts row["id"] # row[“id”].is_a? Integer
if row["dne"] # non-existant hash entry is nil
puts row["dne"]
end
end
.ZTRMHFN
IUUQTHJUIVCDPNCSJBONBSJPNZTRMVTBHF