I should have mentioned that the connect call uses AutoCommit like this:


my $dbh=DBI->connect(DBD:mysql:databasename, "username", "userpassword", {AutoCommit =>1});


Hi All,

I have a script that updates a value in a table using

$handle=$dbh->do(UPDATE league SET available=DATE_ADD(NOW() INTERVAL $offset DAY....);

The script then reads the value of "available" using a prepare/execute/fetchrow statement.

The script then needs to e-mail the new value of the "available" field to the user. The script works, the table is correctly updated and the email is correctly sent EXCEPT that the date sent to the user is the OLD value of "available" not the updated value of "available."

It seems that the modifications to the table are not commited when the SELECT statement is executed. Do changes to a table not happen until the end of a script, or until $dbh->disconnect; is executed? How do I commit changes midway through a script so I can read the new value of the field?

Dave


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to