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

Mike fromlists at talkingspider.com
Mon Aug 11 20:55:32 CEST 2008


$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