| db_query | R Documentation |
Gets data from a database using a query and connection name. The connection is created, used, and automatically closed.
db_query(query, connection_name, ...)
query |
SQL query to execute |
connection_name |
Name of the connection in config.yml |
... |
Additional arguments passed to DBI::dbGetQuery |
A data frame with the query results
if (FALSE) {
users <- db_query("SELECT * FROM users", "my_db")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.