[TYPO3-core] RFC #10786: Add a wrapper for mysql_fetch_field in t3lib_db

Martin Kutschker masi-no at spam-typo3.org
Wed May 13 12:40:46 CEST 2009


Michael Stucki schrieb:
> Hi Masi,
> 
> Martin Kutschker schrieb:
>>> Problem:
>>> The Extbase persistence needs a new database method to fetch extended
>>> field information for a query result with joined tables (e.g. for eager
>>> loading of "has one" relations). This can be done with mysql_fetch_field
>>> but it is not available as a wrapper function in t3lib_db right now.
>>>
>>> Solution:
>>> Add a sql_fetch_field wrapper function to t3lib_db.
>>
>> I tried to find the equivalent for this command for PostgreSQL. But I
>> failed.
> 
> Can you collect the field information in any way? I guess so.
> If it's possible, the dbal wrapper just needs to simulate the behaviour
> of the function. It will be slower, but I don't think it's not possible
> at all...

I didn't say that's impossible at all. But mysql_fetch_field() returns
the information on the fields of a result set not a table. This is much
trickier to support in a general manner. I don't think that adding just
another Mysql wrapper in t3lib_db is the solution for ExtBase's problem.

I suggest we discuss possible solutions to the underlying problem before
we add this function to the Core.

Masi


More information about the TYPO3-team-core mailing list