我有一个搜索功能,目前从一个表中获取数据,我也想从另一个表中获取数据。
$query = $this->db->get('tbl_customer');
$this->db->select('in_customer_id, st_company_name, in_customer_type, st_customer_account, st_customer_state_id, flg_customer_account_type, in_status, dt_added_date, st_tag');
if(trim($action['searchtxt'])!='')
$this->db->like('st_company_name', html_entity_decode($action['searchtxt']));
观点:
<div class="floatl" style="width:250px;">
<form name="frm" action="<?php echo $index_url; ?>customers/search/" method="post">
<div class="floatl">
<input name="Search" type="text" class="textboxsearch" id="Search" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" value="<?php if($searchtxt!=''){ echo $searchtxt; } else{ echo 'Search'; }?>" maxlength="50" />
</div>
<div class="floatl searchicon">
<input type="image" src="<?=$admin_base_url?>images/textbox_search.gif" alt="" width="22" height="22" />
</div>
<br />
<br />
<font class="txt9">(i.e. Company, Account name)</font>
</form>
</div>
我想要另外搜索的表名为tbl_admin_user
。关于如何实现这一目标的任何想法?