If you have MySQL 5.0 or greater, you will be able to create a stored
procedure and call it from DBI. 

with warm regards,
Venkat Saranathan
Gulf Breeze Software
www.gulfsoft.com
 
GulfBreeze Blog
www.gulfsoft.com/blog


-----Original Message-----
From: Karjala [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 21, 2006 7:54 PM
To: beginners@perl.org
Subject: MySQL question


Maybe I should ask this question on a database list, but it's related to 
DBI, so I'm asking here also:

I have a field in a record in the MySQL database that contains a number.

I increase it by one with $dbh->do("update table set myfield = myfield + 
1 where mykey = 10");

I was wondering whether there's a way to find out the value of myfield 
right after the update.

Running a "select myfield" right after the update is not a good enough 
solution to my problem, since this is a web-based application, and 
therefore it's possible that myfield might increase again between the 
time of the first update and the select.

Do you know of any solution to this problem?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to