[TYPO3-core] RFC: non-generated sql queries may not be debugged

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Mar 14 14:44:00 CET 2007


Ingo Renner schrieb:
> 
> Am 13.03.2007 um 22:05 schrieb Martin Kutschker:
> 
> Hi Masi,
> 
>> Problem: t3lib_db::debug() always reports  
>> t3lib_db::debug_lastBuiltQuery, which is wrong for those functions  
>> that get their queries directly from the caller.
>>
>> Solution: add $query argument to debug() and use it in these  functions.
> 
> So why not writing those queries to lastBuildQuery?

Possible.

 > As an alternative
> we could add another variable to t3lib_db "lastQuery" use this one or  
> use either one which is filled.

Not possible, as many statements will be called.

But your suggestion is not really necessary. The lastBuiltQuery is a 
workaround to cope with the asynchronous API (create statement / execute 
statement). And direct SQL calls are not so widespread (in the Core).

The real solution would of course be to use query objects instead of 
properties of one DB object.

Masi


More information about the TYPO3-team-core mailing list