Callback_Pushing selected record from drop down in SQL database (Not working)

Hi All,

I am trying to execute a sql query post change in drop down, below is the code.

select = Select(title=“Select field1:”, value=“foo”, options=Test_list)

def update_data(attrname, old, new):

query2="INSERT INTO test_table (LastName) VALUES ('"+var+"');"

engine.execute(text(query2))

for w in [offset, amplitude, phase, freq,select]:

w.on_change(‘value’, update_data)

Hi,

Have you run the app with "bokeh serve" at the command line? Have you verified if the callback is triggering at all (e.g with a print statement?)

Thanks,

Bryan

···

On Jan 24, 2019, at 05:21, Vineet Garg <[email protected]> wrote:

Hi All,

I am trying to execute a sql query post change in drop down, below is the code.

select = Select(title="Select field1:", value="foo", options=Test_list)
def update_data(attrname, old, new):
      query2="INSERT INTO test_table (LastName) VALUES ('"+var+"');"
  engine.execute(text(query2))
for w in [offset, amplitude, phase, freq,select]:
    w.on_change('value', update_data)

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ebd659f6-a72d-4fe0-b64f-79c273824fe2%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.