When defining a grid in Zend1 using BvB Grid, I would like to insert a rather big raw sql query with many joins and functions like count(), round(sum()), sub queries and a CASE switch.
Normally I work like this:
$table = new App_Application_Model_DbTable_Table();
$select = $table->select()
->setIntegrityCheck(false)
->from(etc)
->joinLeft(etc);
$grid->query($select);
But since my query is so large and specific, that is not possible. The query generates statistics and my client would like to see them all in one grid view. The query works just fine and fast, but how to get its results in a grid?
How can I offer a raw MySql query to BvB grid?