Hi, I am sorry I don't get it :/ How do I pull of a single value from this query: "SELECT uuid FROM fifo_intercept ORDER BY time_id DESC LIMIT 1" How can I save the result into the variable fifo_uuid with dbh:query?
dbh:query(string.format("SELECT uuid FROM fifo_intercept ORDER BY time_id DESC LIMIT 1"), function(row) fifo_uuid = row.uuid; end); Found it myself :) On Mon, Apr 6, 2015 at 9:56 PM, Paul Atreides < paul.atreides83@googlemail.com> wrote:
Hi,
I am sorry I don't get it :/ How do I pull of a single value from this query:
"SELECT uuid FROM fifo_intercept ORDER BY time_id DESC LIMIT 1"
How can I save the result into the variable fifo_uuid with dbh:query?
local var_a dbh:query("SELECT uuid FROM fifo_intercept ORDER BY time_id DESC LIMIT 1", function(u) var_a = u.uuid end) 2015-04-06 22:56 GMT+03:00 Paul Atreides <paul.atreides83@googlemail.com>:
Hi,
I am sorry I don't get it :/ How do I pull of a single value from this query:
"SELECT uuid FROM fifo_intercept ORDER BY time_id DESC LIMIT 1"
How can I save the result into the variable fifo_uuid with dbh:query?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- with best regards, Dmitriy Borisov
participants (2)
-
Paul Atreides
-
Борисов, Дмитрий / Dmitriy Borisov