Skip to content

Commit

Permalink
Use querybuilder for where statement
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit1290 committed Apr 8, 2019
1 parent 9efd0ba commit d45acfb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion start.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d45acfb

Please sign in to comment.