[TYPO3] MySQL LAST_INSERT_ID() returns 0, different connection???
Andreas Förthner
Andreas.Foerthner at netlogix.de
Mon Feb 13 17:24:17 CET 2006
Andreas Förthner schrieb:
> Hi list,
>
> I just tried to fill a table and its mm-table with the right ids. I
> insert the values in the main table and then I try to insert the
> mm-relation, for that reason I need the id of the inserted record. I
> tried that with the LAST_INSERT_ID() function in mysl, but it seems to
> return always 0. As far as I know it only will return the id if the two
> insert-statements are in the same database connection... Is it possible
> that TYPO3 opens an new connection for each query?
>
> Does anybody know a solution for that problem? How do you fill mm-tables
> usually?
>
> Thank you for your help...
>
> Regards
>
> Andreas
Hi,
sorry I'm on the wrong list... I'll try it again on the dev list...
Regards
Andreas
More information about the TYPO3-english
mailing list