[TYPO3] select global for db relations in extensions

Kahlil Lechelt k.lechelt at gmx.de
Thu Jan 5 14:39:41 CET 2006


i have the problem, that typo3 does the wrong db request whenn i try to 
create a relation to a custom db in my extension and choose "select 
global" as selectbox type...

i just read that somebody had the same problem:

quote -------

Did it as admin.
I now debugged the exactly SQL query and now the problem is clear.

The config for "Selectorbox, select global" is:
"foreign_table" => "tx_icrcardealer_marks",
"foreign_table_where" => "ORDER BY tx_icrcardealer_marks.mark",

Then the query is:
SELECT tx_icrcardealer_marks.uid,tx_icrcardealer_marks.mark FROM
tx_icrcardealer_marks,pages WHERE pages.uid=tx_icrcardealer_marks.pid
AND NOT pages.deleted AND 1=1 ORDER BY tx_icrcardealer_marks.mark

The important part is:
WHERE pages.uid=tx_icrcardealer_marks.pid

tx_icrcardealer_marks.pid ==> is 0 because they are in the root page
pages.uid ==> is never 0 because autoincrement starts always at 1

Don't think this is a bug... (or is it??) but is "global (with
exeption)" and the docs are false.

Greets
Urs

quote end ------

but he didnt find  a real solution to fix the global selection.

where is this db request created?

is there no solution for this problem? anybody else having the same problem?

thx

kahlil



More information about the TYPO3-english mailing list