TYPO3

Tutorials - Howto`s - Tipps & Tricks

Tutorials \ Entwicklung \ Debug Extbase-SQL-Querys
Tags: SQL, Debug, extBase
Klicks: 710
Debug Extbase-SQL-Querys
Von: layneobserdia
Am: 10.08.2011 - 13:03

Debug Extbase-SQL-Querys

You can debug the EXTBASE-SQL-Querys by inserting the debug-Code into the File 

typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php

Search for the Method "buildQuery". That is where the querys are build. Insert your code and see the result.

For Example, add the lines before the return-Statement. Change yourtablename to your table name. This will prevent you from dumping every Query. You just will see the querys for the specified table.

if (in_array("your_table_name", $sql['tables'])) {
    var_dump($statement);
    print_r($statement);
}

Kommentare

To top TYPO3 - Tutorials - Howto`s - Tipps & Tricks