@@ -139,7 +139,7 @@ public function getAddressBooksForUserCount($principalUri) {
139139			->from ('addressbooks ' )
140140			->where ($ queryexpr ()->eq ('principaluri ' , $ querycreateNamedParameter ($ principalUri
141141
142- 		$ result$ queryexecute ();
142+ 		$ result$ queryexecuteQuery ();
143143		$ columnint ) $ resultfetchOne ();
144144		$ resultcloseCursor ();
145145		return  $ column
@@ -1130,15 +1130,18 @@ private function searchByAddressBookIds(array $addressBookIds,
11301130			return  (int )$ match'cardid ' ];
11311131		}, $ matches
11321132
1133+ 		$ cards
11331134		$ query$ this db ->getQueryBuilder ();
11341135		$ queryselect ('c.addressbookid ' , 'c.carddata ' , 'c.uri ' )
11351136			->from ($ this dbCardsTable , 'c ' )
1136- 			->where ($ queryexpr ()->in ('c.id ' , $ querycreateNamedParameter ($ matchesPARAM_INT_ARRAY )));
1137- 
1138- 		$ result$ queryexecute ();
1139- 		$ cards$ resultfetchAll ();
1137+ 			->where ($ queryexpr ()->in ('c.id ' , $ querycreateParameter ('matches ' )));
11401138
1141- 		$ resultcloseCursor ();
1139+ 		foreach  (array_chunk ($ matches1000 ) as  $ matchesChunk
1140+ 			$ querysetParameter ('matches ' , $ matchesChunkPARAM_INT_ARRAY );
1141+ 			$ result$ queryexecuteQuery ();
1142+ 			$ cardsarray_merge ($ cards$ resultfetchAll ());
1143+ 			$ resultcloseCursor ();
1144+ 		}
11421145
11431146		return  array_map (function  ($ array
11441147			$ array'addressbookid ' ] = (int ) $ array'addressbookid ' ];
0 commit comments