Hi, All

I'm debugging the following Lua script which should be inserting records into database using data, returned from preceding SQL query:

image.png

Everything works fine, unless SELECT returns no rows producing the following error:

[ERR] freeswitch_lua.cpp:460 DBH NOT Connected.

Are there any references as for how such empty responses should be correctly handled in Lua code to avoid this error, while using dbh:query?

Regards,
Marc