[Solar-talk] lastInsertId() not working with MySql?

Paul M Jones pmjones at solarphp.com
Thu Mar 29 12:43:24 PDT 2007


On Mar 29, 2007, at 12:32 PM, Rodrigo Moraes wrote:

> I remembered to investigate this today and discovered that it was  
> my fault...
>
> I forgot that I have a Tipos_Sql_Adapter_Mysql class just to set the
> connection charset, and it was not updated to check if $this->_pdo is
> already set on _connect()... So it was connecting again, and the last
> inserted id was always 0.

I'm very sorry that you had trouble; that kind of small detail has  
bitten me more often than I can remember.

Based on this news, would it be OK for me to close the related ticket  
in Trac?


--

Paul M. Jones  <http://paul-m-jones.com>

Solar: Simple Object Library and Application Repository
for PHP5.   <http://solarphp.com>

Savant: The simple, elegant, and powerful solution for
templates in PHP.   <http://phpsavant.com>




More information about the solar-talk mailing list