[Freeswitch-users] Calling db in lua script

Archana Venugopan a.venugopan at mundio.com
Tue Feb 12 17:15:47 MSK 2013


I tried executing a simple DB query in lua script in freeswitch.

dbh:execute{"Select * from dir_users"}

But I got this error
2013-02-12 14:09:56.247165 [ERR] mod_lua.cpp:198 /usr/local/freeswitch/scripts/directory.lua:184: attempt to call method 'execute' (a nil value)
stack traceback:
        /usr/local/freeswitch/scripts/directory.lua:184: in main chunk
2013-02-12 14:09:56.247165 [ERR] mod_lua.cpp:264 LUA script parse/execute error!

Can anyone please point what is the mistake I have done and why execute method is not being recognised? Thanks.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130212/e2bd1461/attachment.html 

Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list