[ic] SQL query

Stefan Hornburg interchange-users@icdevgroup.org
Wed Mar 26 15:00:01 2003


On Wed, 26 Mar 2003 13:25:09 -0600
Michael <mslack@g1.slackford.com> wrote:

> Hi folks.
> 
> Is it possable to have more than one sql statement in a [query] tag?
> I have a table I am inserting data into where the key is defined as 
> auto_increment.  After that insert, I wanted to use the MySql 
> last_insert_id() function to grab the abovementioned key value for
> use elsewhere.  The MySql last_insert_id() fcn is valid on a per connection
> basis, and I am assuming (danger!) that the [query ...] ... [/query] 
> container pair opens the connection, does its thing, then closes the 
> connection.  (I can think of a few other places where multiple SQL statements
> per connection can be useful to me as well.
> 
> I can also work around this too... 

I suggest to use set_slice resp. set_row from embedded Perl. They return
the key generated by MySQL.

Bye
	Racke