Revize 1d217727
Přidáno uživatelem David Raška před asi 9 roky(ů)
application/models/account.php | ||
---|---|---|
return $this->in('account_attribute_id', $aaids, TRUE)
|
||
->select_list('id', $concat, 'account_attribute_id');
|
||
}
|
||
|
||
|
||
/**
|
||
* Returns grouped accounts for use in json response for account filter
|
||
*
|
||
* @param string $filter_sql
|
||
* @return Database_Result
|
||
*/
|
||
public function get_accounts_to_dropdown($filter_sql = '')
|
||
{
|
||
$having = '';
|
||
|
||
// filter
|
||
if (!empty($filter_sql))
|
||
{
|
||
$having = "HAVING $filter_sql";
|
||
}
|
||
|
||
// query
|
||
return $this->db->query("
|
||
SELECT a.id, a.member_id, a.name as aname, m.name as mname, a.account_attribute_id
|
||
FROM accounts a
|
||
LEFT JOIN members m ON m.id = a.member_id
|
||
$having
|
||
ORDER BY aname
|
||
");
|
||
}
|
||
}
|
Také k dispozici: Unified diff
refs #967: Filtering destination account