phpSPO
phpSPO copied to clipboard
Caml Query not working for document library
<View><RowLimit>100</RowLimit></View>.
It retrieves all the items...If I give Scope to Recursive even though it is getting all the items.
Hi I've got the same problem with query and personally I've solved the problem without loading the items returned by getItems call in the context
for instance :
not working CAML $caml = "Your CAML"; $list = $ctx->getWeb()->getLists()->GetByTitle({TitleOfYourList}); $res = $list->getItems($caml); $ctx->load($res); $ctx->executeQuery();
working CAML $caml = "Your CAML"; $list = $ctx->getWeb()->getLists()->GetByTitle({TitleOfYourList}); $res = $list->getItems($caml); $ctx->executeQuery();
I don't know if this is the correct way to execute a CAML query or if there is a bug.
I'm using version v2.4.2 I know it's an old version and maybe the new version work differently.