From d45acfbc348d66344488ab37e96b810728ace3c8 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Mon, 8 Apr 2019 09:36:06 +0530 Subject: [PATCH] Use querybuilder for where statement --- start.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/start.php b/start.php index 2ac694f..110f594 100644 --- a/start.php +++ b/start.php @@ -78,7 +78,10 @@ function auto_sitemap_getEntityUrls( $tipo ){ } $options['limit'] = $max_urls; - $options['wheres'] = array('e.access_id = 2'); + // $options['wheres'] = array('e.access_id = 2'); + $options['wheres'] = [function(\Elgg\Database\QueryBuilder $qb, $main_alias) { + return $qb->compare("{$main_alias}.access_id", '=', '2'); + }]; $entradas = elgg_get_entities($options); foreach ($entradas as $value) {