Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: getting the ids of records affected by an input statement

by aquarium (Curate)
on Nov 22, 2010 at 23:07 UTC ( [id://873071]=note: print w/replies, xml ) Need Help??


in reply to getting the ids of records affected by an input statement

failing any provisions any particular db provides returning affected rows, or even db logs...you could add a column to the table that will hold your marker for your updates. Each time you do the update, programmatically pick a value that will be used in the update. after some updates, you will be able to query the db for the value(s) in that column. this guarantees atomicity with your update statement, so doesn't suffer latency issues if you do a select and then the equivalent update. I'd only do this (extend the table) if your requirement is part of the "business rules", and hence part of the specification for the database schema.
the hardest line to type correctly is: stty erase ^H
  • Comment on Re: getting the ids of records affected by an input statement

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-16 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found