Jump to content

Add "GROUP BY" to simple_construct method


Guest marcele

Recommended Posts

Just a suggestion .. sometimes I want to use 'GROUP BY' in a simple_select .. it seems like it is missing from the IPS DB Driver..

eg

$this->ipsclass->DB->simple_construct( array(

'select'	=> 'f.foo, COUNT(*) AS some_count',

'from'		=> array('foo => 'f'),

'add_join'	=> array(


0 => array(

'from'	  => array( 'bar' => 'b' ),

'where'	 => 'f.id = b.id',

'type'	  => 'left'

)),


'group'	 => 'f.foo',

'order'	 => 'f.foo ASC'

));

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...