Welcome Guest, Not a member yet? Register   Sign In
get data from query and use it in the next query
#1

[eluser]mvn1990[/eluser]
hi, I've got an issue with my query's. first i wanne get id's and to do that i use this query:

$email = $this->session->userdata('email');

$data['id_project'] = $this->db->select('id_project')
->from('tbl_invited')
->join('tbl_user', 'tbl_user.email = tbl_invited.email')
->where('email', $email);

then i wanne use the id's (some times more than one) to get data by using an other query for example:

$data['id_project'] = $this->db->select('name')
->from('tbl_project')
->where('id_project', 'the id's I got from my first query' );

thanks in advance


Messages In This Thread
get data from query and use it in the next query - by El Forum - 05-13-2011, 04:10 PM
get data from query and use it in the next query - by El Forum - 05-13-2011, 05:08 PM
get data from query and use it in the next query - by El Forum - 05-13-2011, 07:54 PM
get data from query and use it in the next query - by El Forum - 05-14-2011, 02:55 AM
get data from query and use it in the next query - by El Forum - 05-14-2011, 05:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB