[Freeswitch-users] Calling db in lua script
François Delawarde
fdelawarde at wirelessmundi.com
Tue Feb 12 17:30:44 MSK 2013
Maybe because dbh has no 'execute' method?
Try with:
dbh:query(sql)
Regards,
François.
On Tue, 2013-02-12 at 14:15 +0000, Archana Venugopan wrote:
> Hi,
>
>
>
> 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.
>
>
>
> Regards,
>
> Archana
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list