[TYPO3-dev] Joining table with Typo3 ?

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Fri Dec 30 18:09:04 CET 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> 
> Typo3 with DBAL don't use ALIAS for example :  mytable as my 
> 
> See  :
> http://typo3.org/documentation/document-library/doc_core_cgl/Other_guidelines/
> 

Are you sure?

I don't read there not to use ALIAS for tables. They rather say prepend
a tablename  (or table-alias?) to the fieldname.

If you join *table_a* and *table_a* both with a *uid*, don't use simply
*uid* because that is not uniqe.

Use: table_a.uid, table_b.uid instead.

Or with ALIAS: table_a AS ta, table_b AS tb

Use: ta.uid, tb.uid

Regards

Elmar



- --
Climate change 2005: Mexico, Guatemala, New Orleans, Sahel, Bangladesh,
Spain, Portugal, Austria, Swiss, France, ...
Production of CO2 is killing people.
Production of CO2 just for fun is killing people just for fun.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDtWmwO976RNoy/18RAlVXAJ9NpB2fEslpuhyoFRaL/+MOMUkYVwCeNYFO
+fsu9ZFP7UTpX8UYiZuFj5A=
=GRzc
-----END PGP SIGNATURE-----




More information about the TYPO3-dev mailing list