i really need your help. I have an example of a DataBase which table is "t_client (id_cli, name_cli)" I want to select the id of client(id_cli) from "selectInput" and the result gives me the name of client (name_cli) by reactive function. This is my code :
req1 = dbGetQuery(DB, "select id_cli, name_cli from t_client;")
selectInput(inputId = "id_cli", label = "Clients", choices = req1$id_cli)
databaseInput <- reactive({
req1$id_cli = input$id_cli
req2 = dbGetQuery(DB, "select *from t_client where id_cli = 'req1$id_cli';")
req2
})
renderTable({
databaseInput()
})
It doesnt work; i dont have the link between the item from selectInput and the real table "t_client"