Re: [asterisk-users] Return variables from func_odbc calls?

2011-02-01 Thread Tilghman Lesher
On Tuesday 01 February 2011 11:49:51 Paul Belanger wrote: 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

Re: [asterisk-users] Return variables from func_odbc calls?

2011-02-01 Thread Jose P. Espinal
Paul Belanger wrote: 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

Re: [asterisk-users] Return variables from func_odbc calls?

2011-02-01 Thread Tilghman Lesher
On Tuesday 01 February 2011 12:36:46 Jose P. Espinal wrote: Paul Belanger wrote: 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();

Re: [asterisk-users] Return variables from func_odbc calls?

2011-02-01 Thread Paul Belanger
On 11-02-01 01:21 PM, Tilghman Lesher wrote: Assuming you were using a MySQL backend that supported transactions, you could use the transaction layer in Asterisk 1.6.2 and greater to ensure that each channel got a serialized view. That would make this approach work. Ya, I think I'm going to

[asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Sherwood McGowan
This is primarily aimed at Sir Lesher, whose name graces the source code for func_odbc that I'm currently trying to read to answer this question. Tilghman (or anyone else who has determined the answer to this query), I have googled, searched wikis, and I'm currently perusing the source code, but

Re: [asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Tilghman Lesher
On Wednesday 26 January 2011 03:02:19 Sherwood McGowan wrote: This is primarily aimed at Sir Lesher, whose name graces the source code for func_odbc that I'm currently trying to read to answer this question. Tilghman (or anyone else who has determined the answer to this query), I have

Re: [asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Sherwood McGowan
On Wed, Jan 26, 2011 at 3:56 AM, Tilghman Lesher tilgh...@meg.abyt.es wrote: Well, it depends upon what type of query you're performing.  If it is a query which inserts/updates, then ODBC_ROWS will contain an integer specifying the number of rows affected.  -1 is reserved for a statement which

Re: [asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Sherwood McGowan
On Wed, Jan 26, 2011 at 5:17 AM, Sherwood McGowan sherwood.mcgo...@gmail.com wrote: On Wed, Jan 26, 2011 at 3:56 AM, Tilghman Lesher tilgh...@meg.abyt.es wrote: Well, it depends upon what type of query you're performing.  If it is a query which inserts/updates, then ODBC_ROWS will contain an

Re: [asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Paul Belanger
On 11-01-26 04:56 AM, Tilghman Lesher wrote: As far as LAST_INSERT_ID, that is a MySQL-ism that is not supported, since it is not portable across database types. While, LAST_INSERTID(); is a MySQL-ism, I've been able to use it with func_ODBC. Of cource, my database is MySQL and this function

Re: [asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Sherwood McGowan
On Wed, Jan 26, 2011 at 7:01 AM, Paul Belanger pabelan...@digium.com wrote: On 11-01-26 04:56 AM, Tilghman Lesher wrote: As far as LAST_INSERT_ID, that is a MySQL-ism that is not supported, since it is not portable across database types. While, LAST_INSERTID(); is a MySQL-ism, I've been able

Re: [asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Paul Belanger
On 11-01-26 08:19 AM, Sherwood McGowan wrote: While, LAST_INSERTID(); is a MySQL-ism, I've been able to use it with func_ODBC. Of cource, my database is MySQL and this function would not work on anything else. [CREATECALL] dsn=Example writesql=INSERT INTO x (y) VALUES (z) readsql=SELECT

Re: [asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Sherwood McGowan
I actually was pondering that same thing :D On Wed, Jan 26, 2011 at 7:33 AM, Paul Belanger pabelan...@digium.com wrote: On 11-01-26 08:19 AM, Sherwood McGowan wrote: While, LAST_INSERTID(); is a MySQL-ism, I've been able to use it with func_ODBC.  Of cource, my database is MySQL and this

Re: [asterisk-users] Return variables from func_odbc calls?

2011-01-26 Thread Tilghman Lesher
On Wednesday 26 January 2011 07:01:12 Paul Belanger wrote: On 11-01-26 04:56 AM, Tilghman Lesher wrote: As far as LAST_INSERT_ID, that is a MySQL-ism that is not supported, since it is not portable across database types. While, LAST_INSERTID(); is a MySQL-ism, I've been able to use it with