Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: dbi and mult statements

by lachoy (Parson)
on Jul 11, 2002 at 03:48 UTC ( [id://180932]=note: print w/replies, xml ) Need Help??


in reply to dbi and mult statements

When doing something like this, you have two options. First, if you're not dealing with too much data, you can select it all into a data structure, start a transaction, then do the inserts and deletes while iterating through the data structure. Once done you can commit/rollback.

The other option is to create two handles. The first one just performs the select and iterates through the rows. The second one does the inserts and deletes with transaction control.

You definitely cannot do this in a single statement, unless that statement calls a stored procedure which does the actual work :-)

Chris
M-x auto-bs-mode

Replies are listed 'Best First'.
Re: Re: dbi and mult statements
by smackdab (Pilgrim) on Jul 11, 2002 at 04:08 UTC
    That makes sense ;-) glad I asked !

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://180932]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-24 19:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found