Welcome Guest, Not a member yet? Register   Sign In
How do this!!!!! query - subquery
#1

[eluser]tnathos[/eluser]
Hi everybody.

Need help! i have the next query, in this query a field to the clausule where revived for parameter and result an unique result from the other subquery in the same rutine.. in mysql works perfect.. but not know, how built the rutine in CI.. this the code.

The second query recived an parametrer post...

CI


No problem, i solution!!!
#2

[eluser]MeanStudios[/eluser]
Ummm.......*stares blank at the screen*.....what? O.o
#3

[eluser]Yorick Peterse[/eluser]
[quote author="MeanStudios" date="1241351510"]Ummm.......*stares blank at the screen*.....what? O.o[/quote]

So I'm not the only one who doesn't get it ?
#4

[eluser]Dam1an[/eluser]
If you reread the full first post it'll make sense (or just read the last line)

There was some code there before... but he folced his problem, and has removed the code, instead of saying what the solution was
#5

[eluser]Yorick Peterse[/eluser]
[quote author="Dam1an" date="1241361711"]If you reread the full first post it'll make sense (or just read the last line)

There was some code there before... but he folced his problem, and has removed the code, instead of saying what the solution was[/quote]

Oh lol, would be nice if he shared his solution with us.
#6

[eluser]tnathos[/eluser]
Lol sorry guys i cut the code for error.. the problem solution compose the compose the query manuality, but think is not the better option.. what do you think?

Code:
$where ="sys_balance_client.plataform` =(select `idPlataform` from `sys_plataforms`
        where `plataform`='". $this->input->post('platDestino'). "')
        AND `sys_balance_client`.`client`='" . $this->session->userdata('email'). "'";
        $this->db->select('sys_balance_client.idBalance, sys_balance_client.quota, sys_plataforms.idPlataform');
        $this->db->from('sys_balance_client');
        $this->db->join('sys_plataforms','sys_plataforms.idPlataform=sys_balance_client.plataform');
        $this->db->where('sys_balance_client.state',1);
        $this->db->where($where);
        $query = $this->db->get();




Theme © iAndrew 2016 - Forum software by © MyBB