[TYPO3] After using the API to copy a page, sql_insert_id() is 0. How do I get insert id?

Peter Klein peter at umloud.dk
Mon Aug 11 21:25:37 CEST 2008


Hi Mike.
Try:

$id = $tce->substNEWwithIDs['NEW'];

--
Peter Klein

"Mike" <fromlists at talkingspider.com> wrote in message 
news:mailman.23363.1218480825.4573.typo3-english at lists.netfielders.de...
>
> $tce = t3lib_div::makeInstance('t3lib_TCEmain');
> $tce->stripslashes_values=0;
> $cmd['pages'][551]['copy'] = 1822;
> $tce->start(array(),$cmd);
> $tce->process_cmdmap();
> t3lib_BEfunc::getSetUpdateSignal('updatePageTree');
>
> $id = $GLOBALS['TYPO3_DB']->sql_insert_id();
> echo $id ;
>
> A copy of page 551 is successfully made.  But $id is 0.  But how do I
> get the id of the copy?
> 




More information about the TYPO3-english mailing list