in reply to Re: MySQL "Counter"?
in thread MySQL "Counter"?
If you need to know what is the value after the update, do as follow:
$dbh->do('UPDATE mytable SET myfield = LAST_INSERT_ID(myfield + 1)'); ($myfield) = $dbh->selectrow_array('SELECT LAST_INSERT_ID()');
This will work only with MySQL.
Ciao, Valerio
|
|---|