[TYPO3-mvc] debug query

Stefano Cecere scecere at krur.com
Mon Oct 15 13:17:06 CEST 2012


hi
i'm having strange results in a (maybe complex or errated) query

BUT i could not find an easy way to output the exact sql query code sent 
to mysql!

$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
$GLOBALS['TYPO3_DB']->debugOutput = true;
t3lib_div::devlog('SQL-Query', 'myext', 0, 
Array($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery));

always shows a cache:

SELECT content FROM cf_extbase_object WHERE identifier = 
'f1117553363716e400fe95c8a2374b5c7a4a5244' AND cf_extbase_object.expires 
 >= 1350298714 LIMIT 1

(BUT the action is NON CACHED!)

i did also set $TYPO3_CONF_VARS['SYS']['sqlDebug'] = '2';
it gives LOTS og queris done.. but not mine (a part the 
cf_extbase_object one)


the ONLY way i could get the output of my query has been by uncommenting 
two //debug lines in /extbase/Classes/Persistence/Storage/Typo3DbBackend.php

is it the best way?

(quite tired now :)


-- --- ----- -------

Stefano Cecere
KRUR studio - http://krur.com


More information about the TYPO3-project-typo3v4mvc mailing list