Could you just give me an idea of the code, as if I try break it says its outside of the loop, and return doesnt exit the function loop, as I presume my if statements are causing issues,
assert (dbh:query(todnew_query,function(todresult)
local t = os.date("*t");
if (tostring(todresult.year) == tostring(t.year) and tostring(todresult.month) == tostring(t.month)) then
freeswitch.consoleLog("notice","Year and Month Match, next step is day of month\n")
if (tostring(todresult.dayofmonth) == tostring(t.day)) then
freeswitch.consoleLog("notice","This entry matches on Day of month too\n")
return <<---tried return or break here, is this correct?
end
if (tostring(t.day) >= startday) and (tostring(t.day) <= endday) then
freeswitch.consoleLog("notice", "Today is in the time range\n")
end
end
end))
Thanks again.