Description Usage Arguments Value Author(s)
This function performs all the actions needed to run a query that returns tabular data from a MySQL server. It handles connecting, querying and disconnecting. The query can either be passed directly as a string or as a path to a file containing a SQL statement.
The yaml file must contain host, dbname, user and password. Port is optional, if not present in the yaml file, the default for MySQL will be used.
1 | MySQLQuery(query, id, yamlFile = "~/db.yml")
|
query |
The query to be ran. It can be a file with SQL or a character vector |
id |
The server ID in the yaml config file |
yamlFile |
The server configuration yaml file |
A dataframe with the result of the query
Ricardo Vladimiro
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.