# Connect to a database
dbh = DBI.connect('dbi:Mysql:rubydbi:localhost', 'root', '123456')
dbh.do('DROP TABLE IF EXISTS people')
dbh.do('CREATE TABLE people (id int, name varchar(30))')
# Insert some rows, use placeholders
sql = 'INSERT INTO people VALUES (?, ?)'
dbh.prepare(sql) do |sth|
# Select all rows
sth = dbh.prepare('SELECT * FROM people')
# Print out each row
while row = sth.fetch do
# Close the statement handle when done
dbh.do('DROP TABLE people')
# Finally, disconnect
/* This is a comment. */
/* /This is a comment. */
/* *This is a comment. */
/* This is a comment. /* */*/
/* This is a comment. /* This is a nested comment. */ */
/* The comment starts here.
/* The nested comment starts here.
The nested comment ends here. */
The comment ends here. */
/* The comment starts here,
continues to this line,&
and finally ends here. */
// This entire line is a comment.
// This entire line is a comment. //
// /This entire line is a comment.
// This entire line is a comment. */
// This entire line is a comment. /*
Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to “image”, but the BUTTON element type allows content.