[Freeswitch-users] valet_park help needed
Mimiko
vbvbrj at gmail.com
Fri Nov 30 23:00:45 MSK 2012
> On Fri, Nov 30, 2012 at 3:35 AM, Nitin Tomer <ntomer at newgen.co.in
> <mailto:ntomer at newgen.co.in>> wrote:
> I want to execute the above query, and check whether any result
> came. If results came, then I want to proceed to next number. And if
> no result came, then I want to set it in the session variable and
> break from the while loop. But I could only find the syntax for
> assert, no way to check whether the query returned any result or
> not. Please help me out.____
This is how I do it:
querystring="SELECT `name` FROM `table` WHERE `id`="..id.."
dbh:query(querystring,function(row) result=row.name end)
if result~=nil then
-- do something with the result get
end
--
Mimiko desu.
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list