one search term - two sets of results with codeigniter. how to? -


i have search form. when type term, first search trough users table , return name, username, e-mail etc…and next should perform query same search term table example: posts , return posts user name , post.

so have return , display 2 sets of results. must admit totally lost, , have no idea how proceed.

anyone can me idea how codeigniter?

thanks in advance, zoreli

you cannot 2 searches asycn if what's you're looking do.

the best , easiest way this:

$this->load->model('search');  $data['users'] = $this->search->searchusers($searchterm); $data['posts'] = $this->search->searchposts($searchterm);  $this->load->view('yourview',$data); 

this assumes search model has methods search tables. in view, can iterate on $users , $views reference returned results.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -