[asterisk-users] Return variables from func_odbc calls?
Sherwood McGowan
sherwood.mcgowan at gmail.com
Wed Jan 26 05:17:10 CST 2011
On Wed, Jan 26, 2011 at 3:56 AM, Tilghman Lesher <tilghman at 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 failed, since it is perfectly possible for an UPDATE
> to succeed, yet affect 0 rows. For SELECT queries, however, that is a
> much more difficult question, since it depends upon the particular query.
> Again, it is perfectly possible for a SELECT query to successfully run, yet
> return 0 rows. Or it might be that with your dataset, you should never get
> 0 rows returned. These are questions that must be pondered by the
> particular data administrator, not answers that I can provide as the author
> of the tool.
>
> As far as LAST_INSERT_ID, that is a MySQL-ism that is not supported,
> since it is not portable across database types.
>
> --
> Tilghman
Thanks mate, that's what I was looking for :D Forgot about
LAST_INSERT_ID being a MySQL-ism, but that's no big deal, I'll get by
without it ;-) The ODBC_ROWS variable was what I was looking for,
thanks!
More information about the asterisk-users
mailing list