CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Task #5052

Bracket Joins

Added by Dirk Wildt over 3 years ago. Updated over 2 years ago.

Status:New Start date:2009-10-20
Priority:Should have Due date:2009-10-31
Assignee:Dirk Wildt % Done:

0%

Category:Images Spent time: -
Target version:4.7.0 Estimated time:0.18 hour
Votes: 0

Description

Ich habe erst einmal die JOIN-Variante probiert, bevor ich noch die TCA erweitere, weil ich es einfach mal ausprobieren wollte.
Das habe ich dann auch hinbekommen. Dank der devlog-Extension, sonst hätte ich wohl nicht raus bekommen, dass ich auch
ein "fields" ind den "aliases" benötige.
Dennoch bekomme ich eine Fehlermeldung, da die JOINS nicht korrekt geklammert wurden. Dies ist ab MySQL in der Version 5
wichtig. Oder habe ich an einer anderen Stelle einen Fehler erzeugt.

Der Fehler im FE:

SQL Fehler

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'L L AS `L` ON ( L ) t' at line 3

SELECT tx_partner_main.last_name, tx_partner_main.first_name, tx_partner_contact_info.number FROM tx_partner_main AS `main` L L AS `L` ON ( L ) t t AS `t` ON ( t ) c c AS `c` ON ( c ) c c AS `c` ON ( c ) WHERE main.deleted=0 AND main.hidden=0 AND main.pid IN (49)

Das TS:

plugin.tx_browser_pi1 {
autoconfig {
relations = 0
}
views {
list {
1 {
select = tx_partner_main.last_name, tx_partner_main.first_name, tx_partner_contact_info.number
from {
table = tx_partner_main
alias = main
}
andWhere = main.pid IN (###PID_LIST###)
joins {
type = LEFT JOIN
table = tx_partner_contact_info
alias = cinfo
on = cinfo.foreign_uid = main.uid
}
aliases {
tables {
cinfo = tx_partner_contact_info
main = tx_partner_main
}
fields {
uid = main.uid
pid = main.pid
}
}
}
}
}
}

Ist aber auch nicht so wichtig, mein Problem hier zu lösen. Wollte nur darauf hinweisen, dass es bei MySQL 5 eventuell
auch bei anderen zu Fehlern kommen könnte.

CU Daniel

History

Updated by Dirk Wildt over 2 years ago

  • Target version set to 4.7.0
  • Remaining hours set to 0.18

Also available in: Atom PDF