How to perform custom groupby and orderby in a custom dashlet for sugar 6.5?

I am trying to perform a custom query inside my custom dashlet. This is my query at the moment:

$lvsParams = array(

  'custom_select' => ' ,MIN(due_date) as min_date',

  // 'custom_from'=> '',

  'custom_where' => ' AND due_date >= "'.$dbformat.'"',

  'custom_groupby' => ' date_entered'

  );

But the groupby isn't working. I also tried custom_groupBy but still not working.

  • It seems there is no custom_groupBy function. What I did is that I combined it with the custom_where:

    'custom_where' => ' AND due_date >= "'.$dbformat.'" GROUP BY date_entered',