姓名搜索时同时搜索用户名
This commit is contained in:
parent
1c6b29f20e
commit
c5712b84dc
|
@ -59,8 +59,11 @@ class Admin_UserController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->messenger->addMessage('搜索结果');
|
$this->messenger->addMessage('搜索结果');
|
||||||
$select->from('users');
|
$select->from('users');
|
||||||
if(!empty($realname))
|
if(!empty($realname))
|
||||||
$select->where('realname like ? ', '%'.$realname.'%');
|
{
|
||||||
|
$select->where('realname like ? ', '%'.$realname.'%');
|
||||||
|
$select->orWhere('username like ? ', '%'.$realname.'%');
|
||||||
|
}
|
||||||
if(!empty($unit))
|
if(!empty($unit))
|
||||||
$select->where('unit like ? ', '%'.$unit.'%');
|
$select->where('unit like ? ', '%'.$unit.'%');
|
||||||
if(!empty($project))
|
if(!empty($project))
|
||||||
|
|
Loading…
Reference in New Issue