[Solar-talk] lastInsertId() not working with MySql?
Rodrigo Moraes
rodrigo.moraes at gmail.com
Thu Mar 29 12:51:08 PDT 2007
On 3/29/07, Paul M Jones wrote:
> I'm very sorry that you had trouble; that kind of small detail has
> bitten me more often than I can remember.
Bah, this one completely confused me and, to save some time, I just
hacked lastInsertId() to not call _connect(). :)
> Based on this news, would it be OK for me to close the related ticket
> in Trac?
Totally OK. my adapter was re-setting the charset on every call to _connect():
$this->_pdo->exec('SET CHARACTER SET ' . $this->_config['charset']);
I guess this exec, executed in the middle of a insert() and a
lastInsertId(), also resets the last inserted id. I think any exec
would do this, right?
rodrigo
More information about the solar-talk
mailing list