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
In reply to Re: Re: MySQL "Counter"?
by valdez
in thread MySQL "Counter"?
by powerhouse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |