On 9/11/06, Kervin L. Pierre <[EMAIL PROTECTED]> wrote:

Basically, for every iteration we check
that an id exists ( ie. 'query1' ), if
it does we use it.  But if the id does
not exist we insert a row ( ie. 'query2'
), then get the 'last_insert_rowid'
(ie. 'query3' ) and use that.

SQL works best on sets. If you know all the ID's you will use in the loop
it would be much faster to write a statement to process them all at once.

instead of :
for i = 1 to 10
  update table where id = i
next

do this:
update table where id in 1,2,3,4,5,6,7,8,9,10

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to