Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'mysql2'
- client = Mysql2::Client.new(host: 'localhost', username: 'root', password: 'prepolac1964')
- sql = 'select NOW() as timestamp'
- result = client.query(sql)
- result.each do |row|
- puts row['timestamp']
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement