[FLOW3-general] joins in select queries with TypoScript
Jigal van Hemert
jigal.van.hemert at typo3.org
Wed May 2 10:16:06 CEST 2012
Hi,
On 2-5-2012 9:16, Robert Wildling wrote:
> I am wondering if I am looking at the wrong place, but here:
> http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.7.0/view/1/7/
>
> there is nothing metioned about any join-possibilities in tables queries
> done with TS. There are other results out there, but where is the real
> docuemntation about it?
One of the properties of the CONTENT object is 'select'. This has a
separate section in the documentation:
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.7.0/view/1/5/#id552862
There you'll find all the options you can use to construct a query. It
has join, leftjoin and rightjoin possibilities, etc.
TIP:
To prevent any security problems in your queries it is advised to use
the 'markers' option as described in that section. You can use
###mymarker### style markers in all 'select' sub-properties and define
the contents (using any stdWrap properties) in the 'markers' property.
This way the contents of the markers are automatically escaped and
quoted whenever this is needed, to prevent SQL injections.
--
Jigal van Hemert
TYPO3 Core Team member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list