TYPO3 typoscript WHERE 注释,有什么区别?
TYPO3 typoscript WHERE anotation, what is the difference?
在选择特定内容时,我仅从具有 colPos = 1
的列中收集元素,我有两个适用于 where 子句的注释,我想了解其中的区别;
10 = CONTENT
10 {
table = tt_content
select {
pidInList = this
orderBy = sorting
where = {#colPos}=1
where = colPos = 1
}
renderObj = COA
renderObj {
10 = TEXT
10.stdWrap.field = header
}
}
第一个版本ensures proper quoting for SQL field names,第二个版本没有。这确保了与各种 DBMS 的兼容性。如果可能,您应该始终使用第一个版本。
TYPO3 V8中引入了大括号注释
在选择特定内容时,我仅从具有 colPos = 1
的列中收集元素,我有两个适用于 where 子句的注释,我想了解其中的区别;
10 = CONTENT
10 {
table = tt_content
select {
pidInList = this
orderBy = sorting
where = {#colPos}=1
where = colPos = 1
}
renderObj = COA
renderObj {
10 = TEXT
10.stdWrap.field = header
}
}
第一个版本ensures proper quoting for SQL field names,第二个版本没有。这确保了与各种 DBMS 的兼容性。如果可能,您应该始终使用第一个版本。
TYPO3 V8中引入了大括号注释