[TYPO3-dev] Should t3lib_db support MySQL's REPLACE INTO statement?

Karsten Dambekalns karsten at typo3.org
Thu Nov 13 15:52:47 CET 2008


Hi.

Ingo Renner wrote:
> would you be interested to see a 
> $GLOBALS['TYPO3_DB']->exec_REPLACEquery() method?
> 
> please refer to the MySQL docs [1] for details on replace...

No.

Apart from the portability issues it is slower than checking explicitly 
in most cases. Refer to various MySQL speed tuning talks found on the 
net. And it has issues with forein key referential integrity (if someone 
uses that), as it does a DELETE/INSERT, not an UPDATE. Thus (even for a 
moment) referential integrity is broken, the command fails.

See also the comments on the documentation page you pointed to.


Regards,
Karsten




More information about the TYPO3-dev mailing list