[TYPO3-english] wfqbe: how to select select all uid's from csv-field

7 C's Innovations info at 7seas.nl
Fri Aug 13 12:29:13 CEST 2010


To display news for the login-user, selected by category, for all
categories of this fe_user, I constructed a query:

query:
SELECT tt_news.uid, tt_news.title, tt_news_cat.uid, tt_news_cat.title FROM
(((( tt_news LEFT OUTER JOIN tt_news_cat_mm ON tt_news.uid =
tt_news_cat_mm.uid_local ) LEFT OUTER JOIN tt_news_cat ON
tt_news_cat_mm.uid_foreign = tt_news_cat.uid ) JOIN tx_farmersupport_pref
ON  t_news_cat.uid = tx_farmersupport_pref.newscat ) LEFT OUTER JOIN
fe_users ON tx_farmersupport_pref.feuser = fe_users.uid ) WHERE
fe_users.uid = '134' 

table
tx_farmersupport_pref.feuser contains fe_user uid
tx_farmersupport_pref.newscat contains tt_news_cat uid
uid = 1; fe_user = 137; tt_news_cat = 37,36,23

TS
plugin.tx_wfqbe_pi1.customQuery.48 {
TS_WFQBE_FEUSER = TEXT
TS_WFQBE_FEUSER.data = TSFE:fe_user|user|uid
TS_WFQBE_FEUSER.overrideIfEmpty = 1
}

This shows news items of category uid=37, as defined by the log-in user in
table tx_farmersupport_pref. However, the field newscat contains more
categories, not only uid=37 but also uid=36 and 23 in a csv format. To
display the news from uid=36 and 23 too, I tried several different
datatypes for this field and the other join-options, and searched the
internet for sql-statements, available hooks, TS etc., but still don't know
how to solve this problem. 

My conclusions up til now:
- the wfqbe edit-form in FE shows the news-categories of
tx_farmersupport_pref.newscat in the right way; a dropdown showing the
titles of the selected categories marked in color.
- this means that wfqbe is able to distinct and select data in a
"multiple-field", when in csv-format 
- the select-query shows the numbers of a "multiple-field" in csv-format,
when the field "newscat" is displayd (37,36,23) 
- the select-query only sees the first number of a "multiple-field" in
csv-format, when the field "title" (of news-category) is displayed

I'm still looking for a way to tell the select-query to select all the
values of the "newscat" field and show them like "title" of the
corresponding newscategories.

I hope someone can help me on this subject. 
greetz 
Caspar


More information about the TYPO3-english mailing list