--This script has been used to delete unwanted transactions for
--https://redmine.cooperatic.fr/issues/4725
--Several variables must be set :
--@nb : nb of transactions that should be removed
--@date_before : time just before the first transaction we want to remove (ok if includes other transaction as soon as amount is different ; ok to include the first transaction (the true one))
--@date_after : time just after the last transaction we want to remove (ok if includes other transaction as soon as amount is different ; ok to include the first transaction (the true one))
--@montant : positive
--set first name, last name and raison
--CAREFUL ! Variable not working in limit clause : https://stackoverflow.com/questions/245180/using-variable-in-a-limit-clause-in-mysql
--setting limit manualy is therefore REQUIRED in the two first DELETE FROM requests
--It is probably better to identify the flux that have to be deleted and to deduce the operations that have to be deleted as well
--instead of doing so, we sort the operations (prestataire and adherent) by flux_id before performing a DELETE LIMIT in order
--to be sure to delete the operations that are associated to the same flux.
--then we remove the flux
--the drawback of this technique is that it does not make sure that the FIRST flux is the one that is kept if it was in the time interval