[TYPO3-dev] DBAL mapping columns back to result set

Jigal van Hemert jigal at xs4all.nl
Thu Jun 23 17:02:06 CEST 2011


Hi Xavier,

On 23-6-2011 15:34, Xavier Perseguers wrote:
> Hi Jigal,
>
>> It almost seems that only the first table columns get mapped back to the
>> TYPO3 names.
>> I'd like to verify this and provide a fix, but I couldn't find where
>> this mapping is performed. Any hints?
>
> The other way around (where you should look after) is when you retrieve
> recordset using string keys and not numeric indices, that is in
> sql_fetch_assoc().

I had a look here, but will debug more later.

There is in map_assocArray() a comment "Traverse tables from query 
(hopefully only one table):".

I'll check if there is a problem with duplicate names in different 
tables in such a double-join query.

The debug log showed:

1:Table
2:WHERE clause
=====================
1:fc_projects INNER JOIN fc_cr_user_project ON 
fc_cr_user_project.projectid=fc_projects.projectid INNER JOIN fc_users 
ON fc_users.userid=fc_cr_user_project.userid
2:fc_users.loginname = 'xxxxxxxx'

1:fc_projects INNER JOIN fc_cr_user_project ON 
fc_cr_user_project.projectid=fc_projects.projectid
2: fc_cr_user_project.userid = 6 AND fc_projects.projectnr = '000014'

The fact that the whole FROM-part is listed under 'Table' worries me 
slightly.

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert.




More information about the TYPO3-dev mailing list