Welcome Guest, Not a member yet? Register   Sign In
Query from view
#1

[eluser]greenba[/eluser]
Hello,

I have query that runs in the controller:
Code:
$data['query'] = $this->Member->select_sql($id);    
    $this->load->view('myform');

and then outputs data in the view:

Code:
foreach ($query->result() as $row):
   echo $row->post_title;
   echo $row->post_user_id;
endforeach;

So this outputs me a list of posts made by a user. Now I would like to run one more query that would for each post loop through my user table and output user information next to each post. (I dont want to select data from a view or joint those 2 tables at this time in MySQL)

Any ideas?


Messages In This Thread
Query from view - by El Forum - 01-15-2010, 04:58 PM
Query from view - by El Forum - 01-15-2010, 05:06 PM
Query from view - by El Forum - 01-15-2010, 05:07 PM
Query from view - by El Forum - 01-15-2010, 05:09 PM
Query from view - by El Forum - 01-15-2010, 05:10 PM
Query from view - by El Forum - 01-15-2010, 05:12 PM
Query from view - by El Forum - 01-15-2010, 06:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB