Re: Nom de compte absent pour certains comptes
Date: mardi 25 janvier 2011 03:23:08
Peut etre en supprimant et recréant le compte mais ceci est un travail lourd ( et je n'ai pas essayé)
A priori seul les comptes adhérents sont dans ce cas. la requête suivante affichera les intitulés correctement
SELECT account.id, export_account, IFNULL(account.name, CONCAT(authentication.last_name, ' ', authentication.first_name)) AS nom, IFNULL(sumAccountEntry(account.id,'$year-12-31 22:59:59'),0) AS solde
FROM account
LEFT JOIN authentication ON authentication.id=account.owner_id
WHERE account.activated=1 AND sumAccountEntry(account.id,'year-12-31 22:59:59') <> 0
ORDER BY export_account
Ou mieux créer une variable endDateAccount de type Date heure et mettez la requête
SELECT account.id, export_account, IFNULL(account.name, CONCAT(authentication.last_name, ' ', authentication.first_name)) AS nom, IFNULL(sumAccountEntry(account.id,'$endDateAccount'),0) AS solde
FROM account
LEFT JOIN authentication ON authentication.id=account.owner_id
WHERE account.activated=1 AND sumAccountEntry(account.id,'$endDateAccount') <> 0
ORDER BY export_account
Vous pourrez ainsi sélectionner la date à laquelle vous souhaitez arrêter les comptes sans aller modifier la requête