How To Make Shiny Reactivity Work With Sql Database?
Alright, I modified the script following @Pork Chop advice: server.R library(shiny) library(DT) library(RMySQL) con <- dbConnect(MySQL(), user='myuser', host='myhost', dbname='
Solution 1:
1.sqlOutput is a function so change it to sqlOutput()
2. Try this, note this will export is as .csv hope its ok
output$download <- downloadHandler(filename = function() {paste(Sys.time(), ' Fltered_data.csv', sep='')}, content = function(file) {write.csv(sqlOutput()[input$table_rows_all, ], file, row.names = FALSE)})
Post a Comment for "How To Make Shiny Reactivity Work With Sql Database?"