Skip to content

Commit

Permalink
Merge pull request #72 from kcurtin/adding-example-to-readme
Browse files Browse the repository at this point in the history
added another insert example to readme
  • Loading branch information
tenderlove committed Oct 12, 2012
2 parents a6b9f9b + 37c01ba commit 4bf746d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.rdoc
Expand Up @@ -33,6 +33,10 @@ Note that this module is only compatible with SQLite 3.6.16 or newer.
}.each do |pair|
db.execute "insert into numbers values ( ?, ? )", pair
end

# Execute inserts with parameter markers
db.execute("INSERT INTO students (name, email, grade, blog)
VALUES (?, ?, ?, ?)", [@name, @email, @grade, @blog])

# Find a few rows
db.execute( "select * from numbers" ) do |row|
Expand Down

0 comments on commit 4bf746d

Please sign in to comment.