Fork me on GitHub

Does selectExpandedObjectArray() support Group BY?  Bottom

  • I need to do some grouping, it doesn't look like selectExpandedObjectArray supports this? Any recommendations?
  • Yes, you can trick DBUtil into doing this by passing your GROUP BY statement as part of the $where or $sort parameter. It's a bit hacky but it works ...

    The following applies to both $where and $sort: if what you pass in to these parameters does not start with "WHERE" or "ORDER BY" DBUtil will prepend these strings. As such, you can't pass in your GROUP BY statement into an otherwise empty $where/$sort.

    Greetings
    R
  • rgasch

    As such, you can't pass in your GROUP BY statement into an otherwise empty $where/$sort.


    In which case, you could apply further trickeration and pass WHERE 1 = 1.
  • Yes, that would do icon_smile

This list is based on users active over the last 60 minutes.