A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Jump to
Showing posts with label sqlite. Show all posts
Showing posts with label sqlite. Show all posts
Ruby: Read+write to database
require 'sqlite3'
db = SQLite3::Database.new( "db1" )
db.execute('INSERT INTO table_name (id, text) VALUES (1, "hello")')
db.execute( "SELECT* FROM table_name" ) do |row|
puts row.inspect
end
Subscribe to:
Posts (Atom)