local dbh = freeswitch.Dbh("Billing","Billing","Tzru9unbcfuW6PV")
if assert(dbh:connected()) == true then
freeswitch.consoleLog("info", "connected");
assert(dbh:query("SELECT id, profile_name FROM sofia_conf", function(row)
for key, val in pairs(row) do
row[key] = val
-- freeswitch.consoleLog("info", " row.id");
-- freeswitch.consoleLog("info", " profile_name");
freeswitch.consoleLog("info", "row[key]");
-- freeswitch.consoleLog("info", " profile_name");
end
end))
-- stream:write(string.format("%5s : %s\n", row.id, row.profile_name)) -- end)
else
freeswitch.consoleLog("info", "not connected");
end
How to get and store values from mysql database to Lua variables ?
--
Thanks and regards
Virendra Bhati
+91-8885268942
Software Engineer
E-mail-: virbhati@gmail.com
Skype id:- virbhati2
Hyderabad(India)