This is the code documentation for the SproutCMS project

function _getContentsQuery()

Returns the SQL query for use by the contents list.

The query MUST NOT include a LIMIT clause.
The query MUST include a SQL_CALC_FOUND_ROWS clause.
The main table SHOULD be aliased to 'item'.


string $ManagedAdminController->_getContentsQuery ( string $where , string $order , array &$params );


  1. string $where
    A where clause to use.
            Generated based on the specified refine options.
  2. string $order
    An order clause to use.
  3. array $params (by reference)
    Params to bind to the query. These will be modified to include per-record permissions

Return value

  • string
    A SQL query.