Uniformize code and increase speed for extrafields

This commit is contained in:
Laurent Destailleur
2011-06-22 10:58:22 +00:00
parent cee57c2280
commit 041b7d2955
9 changed files with 151 additions and 113 deletions

View File

@@ -202,7 +202,7 @@ class modAdherent extends DolibarrModules
// Fin complement
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'adherent_type as ta, '.MAIN_DB_PREFIX.'adherent as a)';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'adherent_extrafields as ao ON a.rowid = ao.fk_member';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'adherent_extrafields as ao ON a.rowid = ao.fk_object';
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'cotisation as c ON c.fk_adherent = a.rowid';
$this->export_sql_end[$r] .=' WHERE a.fk_adherent_type = ta.rowid';