Skip to content

Instantly share code, notes, and snippets.

@smzn
Created January 20, 2017 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smzn/1d17df3170dea083a90437768076973c to your computer and use it in GitHub Desktop.
Save smzn/1d17df3170dea083a90437768076973c to your computer and use it in GitHub Desktop.
MySQL.R
mysql.connect <- function(){
dbconnector <<- dbConnect(dbDriver("MySQL"),dbname="XXXXX",user="YYYYY", password="ZZZZZZ")
}
mysql.getSelect <- function(){
mysql.data <<- dbGetQuery(dbconnector, "SELECT `attack`, `defence`, `hp`, `exp`, `gold`, `water` FROM `monsters` ")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment