Update all answer articles using script at same time,
Summary
I wanted to update all the articles using a custom script but it's not able to process more than 200 records.Content
I am trying to update all the articles using custom script. I wrote the script which fetches all the answers and then remove a particular lines from the answers.
But in doing so i am able to reterieve only 200 records or so. Is there any better way to update thousands articles.
$ar = RNCPHP\AnalyticsReport::fetch( 106134 );
$arr= $ar->run();
for ( $ii = $arr->count(); $ii--; )
{
$row = $arr->next();
$answer = RNCPHP\Answer::fetch( $row["Answer ID"] );
$html = preg_replace('#<button id="wmcckbtopBtn"(.*?)>(.*?)</script>#is', '', $answer->Solution);
Tagged:
0