[TYPO3-dev] Deleting record several places?

Martin Kutschker masi-no at spam-typo3.org
Mon Jan 5 11:35:57 CET 2009


Franz Holzinger schrieb:
> Simon Justesen a écrit :
> 
>> I need to maintain two tables so that when I delete a record in
>> list-view belonging to my extension it is also deleted in another table.
>> How can I do that?
> In MySQL 5.x you can create a trigger for deletion.
> 
> http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html
> 
> http://all4dev.libre-entreprise.org/index.php/Utilisation_des_triggers#Cr.C3.A9ation_d.27un_trigger_ex.C3.A9cut.C3.A9_avant_une_suppression.
> 
> 
> This should also work even if you delete a row with phpMyAdmin or any
> another MySQL client application.
> 
> But normally TYPO3 records are not deleted, but the deleted field is set
> to '1'.

For this you would need an update trigger.

But as Dmitry said using Mysql triggers conflicts with other TYPO3
mechanisms, so I wouldn't rely on them.

Masi




More information about the TYPO3-dev mailing list