在我从表格中得到一个特定的词之后。我想从数据库中的多个表中得到类似这个词的结果。
function search(){
$search = $this->input->post('searchword');
$this->db->select('articles.title, articles.post');
$this->db->select('files.name, files.desc');
$this->db->select('news.title, news.post');
$this->db->select('projects.title, projects.desc');
$this->db->from('articles, files, news, projects');
// I think problem is here
$like = array('articles.title' => $search,'articles.post' => $search,
'files.name' => $search,'files.desc' => $search,
'news.title' => $search,'news.post' => $search,
'projects.title' => $search, 'projects.desc' => $search);
$this->db->like($like);
return $this->db->get();
}