[TYPO3-dev] Deleting record several places?

Simon Justesen simon at simm.removedk
Wed Jan 7 13:43:06 CET 2009


Martin Kutschker skrev:
> 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

Thanks for an interesting discussion and your help. I chose not to use 
the trigger function (too risky, maybe) and I got 
ProcessCmdMap_postProcess working. Great day!




More information about the TYPO3-dev mailing list