HI All,
I am trying to insert data in sql table with action button from r shiny app. I have 5 columns in my db and I just want to insert data in one column(status) of db only. When I update the selectInput, the selected choice should be saved in the database.
I am using-
updateSelectInput(session,
paste0("selecter_", i),
input[[paste0("selecter_", i)]],
label = NULL)
sql_update <- paste0("INSERT INTO tbl1 (status) VALUES(",paste(input[[paste0('`selecter_`', i)]], sep = "/n"),");")
DBI::dbSendStatement(conn = pms_conn, statement = sql_update)
DBI::dbDisconnect(pms_conn)
But it's not working.