[TYPO3-english] t3lib sql_insert_id()

Dmitry Dulepov dmitry at typo3.org
Tue Mar 17 14:15:51 CET 2009


Hi!

Marcel Remmy wrote:
> In an extension I am developing, it's important to know which UID is
> used for the new inserted element (be_groups / be_users dependencies
> which are set automatically)

If you insert data into any TYPO3 system table, you should NOT access the database directly. You should use TCEmain for this. Otherwise any extension that may be watching for changes, will not be notified. Also reference index will be wrong if you directly manipulate the database. This will cause problems with clean up procedures.

> So I tried to use this function t3lib_sqlengine::sql_insert_id() that

Firsts, it is t3lib_db, not t3lib_sqlengine...

-- 
Dmitry Dulepov
TYPO3 core team
http://dmitry-dulepov.com/article/german-edition-of-my-typo3-extension-development-book.html


More information about the TYPO3-english mailing list