[TYPO3-dev] DBAL Usuage
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Sun Nov 18 15:31:02 CET 2007
belbono schrieb:
> Hi Martin,
>
>
> bad news brackets doesn't work.
> If I give something like
>
> 'FROM PUBLICATIONS INNER JOIN ARTICLE ON (PUBLICATIONS.UID_ =
> ARTICLE.PUBLICATIONS_UID) '
>
> to DBAL I get an Error saying that there is no handler found and no join
> clause and other things...
Could be that DBAL supports currently join condiitons only with OUTER JOINS.
But I still think that it is an error to use upper case table names
unless they are spelled as such in the table definition.
> So I think DBAL cannot handle table attributs with given table name as
> prefix.
> Other example:
>
> SELECT
> PUBLICATIONS.UID_,PUBLICATIONS.TITLE,PUBLICATIONS.RATING,PUBLICATIONS.COMMENT_
> will be converted into
>
> SELECT "PUBLICATIONS"."UID_", "PUBLICATIONS"."TITLE",
> "PUBLICATIONS"."RATING", "PUBLICATIONS"."COMMENT_"
>
> DBAL quotes the table name and that makes wrong sql.
The generated code is IMHO perfectly wrong. Why do you think that the
quoting is incorrect?
Note: the casing may be a problem. ProstgreSQL handles the case of names
differently when using quotes or not. Is this true for Oracle as well.
Masi
PS: Your query uses names that are not TYPO3 "compatible". They should
be named tx_myext_tablename. I sguugest you don't use DBAL if your data
isn't part of your TYPO3 installation. It might be easier for you :-)
More information about the TYPO3-dev
mailing list