Hallo,
On 23.12.2011 09:24, Johannes C. Schulz - EnzephaloN IT-Solutions wrote:
Hallo!
Ein kleines Problem mit formhanlders PreProcessor_LoadDB:
Laut Doku
(http://www.typo3-formhandler.com/documentation/preprocessors/preprocessor-l
oaddb/) gibt es die Möglichkeit ein „limit“ einzufügen. Doch dies greift bei
mir nicht:
2{
class = Tx_Formhandler_PreProcessor_LoadDB
config{
select{
table = tx_enzhotellist_domain_model_type
where = COA
where {
10 = TEXT
10.value = uid=
20 = TEXT
20{
data = GP:formhandler|mtype
sanitize = 1
}
}
limit = 1
}
# add PreProcessed enzhotellist_type-items to markers
1{
mtypename.mapping = typename
}
}
}
Die select-Anfrage kann mehrere Datensätze liefern – ich möchte hier nur
einen haben (egal welchen).
Wo ist mein Fehler?
Viele Grüße
Johannes
Was meinst du mit "greift bei mir nicht"?
Wenn du im Formhandler-TypoScript "debug=1" setzt, wird dir die
SQL-Abfrage angezeigt, die der PreProcessor macht.
Dort kannst du kontrollieren ob sie theoretisch stimmen würde.
Bei mir funktioniert dieses Setup ohne Probleme:
2 {
class = PreProcessor_LoadDB
config {
select {
table = fe_users
where = email='em...@example.tld'
limit = 1
}
1 {
name.mapping = username
email.mapping = email
}
}
}
Die Query dazu:
SELECT * FROM fe_users WHERE email='em...@example.tld' LIMIT 1
lg,
Reinhard
_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german