[Typo3-dev] creating new records with tce
Bernhard Kraft
kraftb at kraftb.at
Sat Jul 30 10:02:26 CEST 2005
Waggershauser, Thomas wrote:
> Hello Developers!
>
> How do I get the the uid of a new record, created with $tce->process_datamap()? Im sure there is a way, but i do not get throug at the moment...
>
Hello,
I don't know if it is correct to do it this way but it works:
you have:
$hash = 'NEW'.md5(something());
$dataArr['whatever_table'][$hash] = array(
'whatever' => 'something',
);
and then you will do:
$this->tce->processDatamap($dataArr, NULL);
and afterwards you can get the UID's of the newly created records
by:
$newUid = $this->tce->substNEWwithIDs[$hash];
hope this helps,
Bernhard
More information about the TYPO3-dev
mailing list