[asterisk-dev] func_odbc.conf - Check Result Count
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Fri Jun 5 10:19:42 CDT 2009
On Friday 05 June 2009 06:22:14 Muhammad Arfeen wrote:
> I'm using func_odbc.conf with Asterisk AEL
>
> I'm getting the query result from func_odbc.conf just fine.
>
> but how would I get the result count of the query I ran, do I have to first
> count the result and the run the actual query ?
>
> any to get the result count just like in PER "$#Result" or something like
> that.
The number of rows should be encoded in ${ODBCROWS} with -1 for the error
value. This, of course, assumes that you're running with mode=multirow, since
the default mode always returns exactly one row (or zero). Also, when it
comes to write queries, ODBCROWS returns the number of rows affected by the
write (again, -1 for error).
--
Tilghman
More information about the asterisk-dev
mailing list