[asterisk-users] Return variables from func_odbc calls?
Paul Belanger
pabelanger at digium.com
Tue Feb 1 11:49:51 CST 2011
On 11-01-26 02:59 PM, Tilghman Lesher wrote:
> On Wednesday 26 January 2011 07:01:12 Paul Belanger wrote:
>> [CREATECALL]
>> dsn=Example
>> writesql=INSERT INTO x (y) VALUES (z)
>> readsql=SELECT LAST_INSERT_ID();
>
> That assumes you have only one call in existence at a time. If two calls
> came in and executed the query at about the same time, it's possible for
> both reads to return the same value.
>
Yup, didn't even think of that. My testing of ODBC was a single
channel. Guess I need another method to return the last ID of the
record that was just inserted.
--
Paul Belanger
Digium, Inc. | Software Developer
twitter: pabelanger | IRC: pabelanger (Freenode)
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-users
mailing list