I just changed this lines in Bruno’s dailyDoc snippet code from
if (is_array($chunk)){
$excludedocs=isset($excludedocs)?explode(',',$excludedocs):array();
$excludedocs[]=$randomDocID;
$excludedocs=implode(',',$excludedocs);
}
to
if (is_array($chunk)){
$excludedocs=isset($excludedocs)?explode(',',$excludedocs):array();
$excludedocs[]=$randomDocID;
$excludedocs=implode(',',$excludedocs);
$excludedocs=substr($excludedocs,0,-1); // strip last comma
}
as this is removing the comma after the last id of excluded docs. Bruno pointed to this as cause of the SQL error I mentioned above.
Thanks again, Bruno, it’s working perfectly now for me in weekly mode.