Revize 1423
Přidáno uživatelem David Raška před více než 12 roky(ů)
freenetis/branches/testing/application/models/users_contacts.php | ||
---|---|---|
JOIN accounts a ON a.member_id = m.id
|
||
LEFT JOIN contacts_countries cc ON cc.contact_id = c.id
|
||
LEFT JOIN countries cou ON cou.id = cc.country_id
|
||
WHERE m.type <> ? AND c.type = ?
|
||
WHERE m.type <> ? AND c.type = ? AND m.id NOT in
|
||
(
|
||
SELECT m.id
|
||
FROM members m
|
||
JOIN membership_interrupts mi ON mi.member_id = m.id
|
||
JOIN members_fees mf ON mi.members_fee_id = mf.id
|
||
WHERE mf.activation_date <= CURDATE() AND mf.deactivation_date >= CURDATE()
|
||
)
|
||
GROUP BY c.id
|
||
", array(Member_Model::TYPE_FORMER, $type));
|
||
}
|
||
}
|
Také k dispozici: Unified diff
Oprava:
- #189: Opraven SQL dotaz pro ziskani vsech kontaktu. Nyni vraci kazdy kontakt jen jednou a nevraci kontakty prerusenych clenu