Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dbRetrieve = function (dbName, user, password, host, port, sqlQuery){
- dbConnection <- dbConnect(
- RMySQL::MySQL(),
- user = user,
- password = password,
- host = host,
- port = port,
- dbname = db
- )
- sqlcmd <- sqlQuery
- sqlData <- dbGetQuery(dbConnection, sqlcmd)
- ##### KILL THE DB CONNECTION ###########
- dbDisconnect(dbConnection)
- return (sqlData)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement