I am trying to create a dynamic query using select input.
Something like
Select * from basket where fruits in("apple","banana","cherry")
I have a table called fruit_list which populates my selectinput box.
selectInput("fruit_list", label = h5("Select fruit"), multiple = T,
choices = (dbGetQuery(conn, "SELECT fruit from fruit_list');")))
So far, when i renderprint my selection I get "apple" "banana" "cherry" I need a comma between the elements to get "apple","banana","cherry" When i choose a single element from the multiselect box "apple"
Select * from basket where fruits in("apple")
my application runs perfectly. However, when i select more than one element "apple" "banana" I get an error: Expecting a single string value: [type=character; extent=2].