I have installed the Members for Elgg 1.8
plugin in my Elgg application, now I'm editing this plugin to display all the user that are created from last admin login to current login.
but I'm not getting the expected results from the query that I have written.
Here is my index.php code
case 'lasttonow':
$db_prefix = elgg_get_config('dbprefix');
$joins = array("JOIN {$db_prefix}users_entity u on e.guid = u.guid");
$time = time();
$options['joins'] = $joins;
options['wheres'] = "e.time_created >= u.prev_last_login";
$options['order_by'] = "e.time_created DESC";
$content = elgg_list_entities_from_metadata($options);
break;
I'm not understanding where I'm doing mistake.
Thank You
I have edited your code to fit in your requirement. Please try following code and you will get what you are expecting. What you were trying to do was wrong, the query you are trying will not display correct result as you are trying to add Prev Last Login of particular user like you mentioned in your code above, actually you were suppose to use Prev Last Login of any users you have logged in to the site.