[TYPO3-core] RFC #12718: TCEforms exec_foreign_table_where_query fails with an Oracle error

Xavier Perseguers typo3 at perseguers.ch
Sun Feb 21 22:22:47 CET 2010


Hey Benni,

>> Test whether REC_FIELD_UID contains a number and if not put "0" instead,
>> this will lead to same result.
> Hey Xavier,
>
> this sounds like a little bit of magic to me, with no reason why a "0"
> is needed there. Either we add a comment in front of this if() clause or
> ... mmh, any way to make the solution "cleaner" or "more reasonable"?

Wahoo! I completely forgot about this. I remember having lost time finding out what the problem was ;-)

Well, what about some comment such as

// $TSconfig['_THIS_ROW']['uid'] is known to contain non-numeric value in some situation.
// E.g., 'NEW4b0b5634a1789' for not yet saved records. Force a numeric value instead to
// ensure DBMS interoperability where field value must stick to its definition unless
// an explicit cast is written. Using '0' instead as it will never be used as an auto-
// increment value and will lead to same resultset as providing an never used (text) value
if ($fTWHERE_subpart[0] === 'uid' && !is_numeric($TSconfig['_THIS_ROW']['uid'])) {
	$fTWHERE_parts[$kk] = '0' . $fTWHERE_subpart[1];
} else {
	$fTWHERE_parts[$kk] = $TSconfig['_THIS_ROW'][$fTWHERE_subpart[0]] . $fTWHERE_subpart[1];
}


-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-team-core mailing list