[TYPO3-mvc] output the created sql

Daniel Dimitrov danielsd_bg at yahoo.fr
Mon Apr 19 11:30:24 CEST 2010


Dear list :),
I'm trying to write my own pagebrowser.
I have a function that returns my database entries with a limit.

public function findAllWithLimit($offset = 0, $limit = 5) {
		$query = $this->createQuery();

		return $query->matching()
			->setLimit((integer)$limit)
			->setOffset((integer)$offset)
			->setOrderings(array('crdate' => 
Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING))
			->execute();
}

I'm wondering if there is an easy way to return the query that this function 
generates?

In Joomla it is really easy to see the output of the query:
$db = JFactory::getDBO();
$query = 'some query';
$db->setQuery($query);
var_dump($db->_sql);

I'm wondering if there is something like the above that I can use to see the 
created query from the framework.
Thank you! 



More information about the TYPO3-project-typo3v4mvc mailing list