Revize 9fd04f67
Přidáno uživatelem David Raška před asi 9 roky(ů)
application/models/search.php | ||
---|---|---|
|
||
return $this->db->query("
|
||
SELECT m.id, m.name AS value,
|
||
CONCAT('ID ',m.id,', ',s.street,' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT('ID ',m.id,', ',IF(s.street IS NULL, '', s.street),' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT(IFNULL(t.translated_term,e.value),' ',m.name,IF(mf.id IS NOT NULL,?,'')) AS return_value,
|
||
'members/show/' AS link FROM members m
|
||
JOIN enum_types e ON m.type = e.id
|
||
LEFT JOIN translations t ON e.value LIKE t.original_term AND t.lang = ?
|
||
JOIN address_points ap ON m.address_point_id = ap.id
|
||
JOIN streets s ON ap.street_id = s.id
|
||
LEFT JOIN streets s ON ap.street_id = s.id
|
||
JOIN towns tw ON ap.town_id = tw.id
|
||
LEFT JOIN membership_interrupts mi ON m.id = mi.member_id
|
||
LEFT JOIN members_fees mf ON mi.members_fee_id = mf.id AND (mf.activation_date < CURDATE() AND mf.deactivation_date > CURDATE())
|
||
... | ... | |
|
||
return $this->db->query("
|
||
SELECT m.id, m.id AS value,
|
||
CONCAT('ID ',m.id,', ',s.street,' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT('ID ',m.id,', ',IF(s.street IS NULL, '', s.street),' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT(IFNULL(t.translated_term,e.value),' ',m.name,IF(mf.id IS NOT NULL,?,'')) AS return_value,
|
||
'members/show/' AS link FROM members m
|
||
JOIN enum_types e ON m.type = e.id
|
||
... | ... | |
return $this->db->query("
|
||
SELECT m.id,
|
||
CONCAT(town, IF(quarter IS NOT NULL, CONCAT(' ', quarter), '')) AS value,
|
||
CONCAT('ID ',m.id,', ',s.street,' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT('ID ',m.id,', ',IF(s.street IS NULL, '', s.street),' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT(IFNULL(t.translated_term,e.value),' ',m.name,IF(mf.id IS NOT NULL,?,'')) AS return_value,
|
||
'members/show/' AS link FROM members m
|
||
JOIN enum_types e ON m.type = e.id
|
||
... | ... | |
return $this->db->query("
|
||
SELECT m.id,
|
||
ap.street_number AS value,
|
||
CONCAT('ID ',m.id,', ',s.street,' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT('ID ',m.id,', ',IF(s.street IS NULL, '', s.street),' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT(IFNULL(t.translated_term,e.value),' ',m.name,IF(mf.id IS NOT NULL,?,'')) AS return_value,
|
||
'members/show/' AS link FROM members m
|
||
JOIN enum_types e ON m.type = e.id
|
||
... | ... | |
|
||
return $this->db->query("
|
||
SELECT m.id, m.organization_identifier AS value,
|
||
CONCAT('ID ',m.id,', ',s.street,' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT('ID ',m.id,', ',IF(s.street IS NULL, '', s.street),' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT(IFNULL(t.translated_term,e.value),' ',m.name,IF(mf.id IS NOT NULL,?,'')) AS return_value,
|
||
'members/show/' AS link FROM members m
|
||
JOIN enum_types e ON m.type = e.id
|
||
... | ... | |
|
||
return $this->db->query("
|
||
SELECT m.id, m.vat_organization_identifier AS value,
|
||
CONCAT('ID ',m.id,', ',s.street,' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT('ID ',m.id,', ',IF(s.street IS NULL, '', s.street),' ',ap.street_number,', ',tw.town,IF(tw.quarter IS NOT NULL,CONCAT('-',tw.quarter),'')) AS `desc`,
|
||
CONCAT(IFNULL(t.translated_term,e.value),' ',m.name,IF(mf.id IS NOT NULL,?,'')) AS return_value,
|
||
'members/show/' AS link FROM members m
|
||
JOIN enum_types e ON m.type = e.id
|
Také k dispozici: Unified diff
refs #1016: Fixes searching of members without street
Fixed ajax search description when member have no street (whole description was empty)