[TYPO3-dev] Problem with long strings in tt_content (Oracle)

Dmitry Dulepov [typo3] dmitry at typo3.org
Thu Dec 6 15:42:24 CET 2007


Moreno Feltscher wrote:
> I completely agree with you Dmitry. If I can solve this problem I'll
> share the solution with the community.
> 
> Now, I've got another question and I don't want to open a new list
> entry for this:
> How can I do an INNER JOIN in TYPO3 database syntax? I tried something
> like this:
> $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(


Firsts, I would use $GLOBALS['TYPO3_DB']->sql_query() for complex queries to ensure that they are not altered by TYPO3.

> But I only get an error with this...:
> ORA-00904: "pages"."title": invalid identifier
> The SQL-Command which is done by DBAL:
> tt_content tt_content.uid AS uid, tt_content.pid AS pid, pages.title
> AS title, tt_content.header AS header, tt_content.bodytext AS
> bodytext, tt_content.tstamp AS tstamp tt_content.pid in (123) AND
> tt_content.sys_language_uid = AND tt_content.pid <> 1 AND
> tt_content.deleted=0 AND tt_content.t3ver_state!=1 AND
> tt_content.hidden=0 AND (tt_content.starttime<=1196948990) AND
> (tt_content.endtime=0 OR tt_content.endtime>1196948990) AND
> (tt_content.fe_group='' OR tt_content.fe_group IS NULL OR
> tt_content.fe_group='0' OR (tt_content.fe_group LIKE '%,0,%' OR
> tt_content.fe_group LIKE '0,%' OR tt_content.fe_group LIKE '%,0' OR
> tt_content.fe_group='0') OR (tt_content.fe_group LIKE '%,-1,%' OR
> tt_content.fe_group LIKE '-1,%' OR tt_content.fe_group LIKE '%,-1' OR
> tt_content.fe_group='-1')) tstamp DESC 0,10
> 
> There isn't a SELECT or WHERE clause... stupid, what's wrong..?

Can be DBAL error. But try sql_query() first.

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"Nothing is impossible. There are only limits to our knowledge"




More information about the TYPO3-dev mailing list