sql_get: Get MySQL query results in 1 shot

Description Usage Arguments Examples

Description

Get MySQL query results in 1 shot

Usage

1
sql_get(selection = "*", table, database = "user_johnsk26", connect = con)

Arguments

selection

Columns to grab

table

Table to choose

database

Database on the MySQL server

connect

A previously opened connection, see example

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## Establish database connection
con <- dbConnect(MySQL(),
                 user = 'myname',
                 password = 'mypassword',
                 host = 'google.com',
                 dbname='mydbname')

## Will pull the entire table "icd_codes"
sql_get("icd_codes")

## End(Not run)

kippjohnson/kippr documentation built on May 12, 2019, 2:02 p.m.