Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ui <- fluidPage(
- numericInput("nrows", "Enter the number of rows to display:", 5),
- tableOutput("tbl")
- )
- server <- function(input, output, session) {
- output$tbl <- renderTable({
- conn <- dbConnect(
- drv = RMySQL::MySQL(),
- dbname = "apilogs",
- host = "localhost",
- username = "root",
- password = "root")
- on.exit(dbDisconnect(conn), add = TRUE)
- dbGetQuery(conn, paste0("SELECT * FROM logs where key = 'agc' LIMIT ", input$nrows, ";"))
- })
- }
- dashboardSidebar(
- selectInput("Filter", "Filter:",
- choices = c())
- )
Add Comment
Please, Sign In to add comment