Welcome Guest, Not a member yet? Register   Sign In
Problem with MVC and passing the query data
#8

[eluser]toopay[/eluser]
*sigh. You can use my dbhelper, just to check if you already created the right query, then you can try to run it too. It will be like this
Code:
// in some controller function
        $pieniadze = 1;
        $dla_kogo = 'foo';
        $this->load->library('dbhelper');
        $test_query = $this->dbhelper->select_fields('nazwa, opis')
                                     ->_from('propozycje')
                                     ->_where_open()
                                     ->_where(array('wymaganePieniadze','>=', $pieniadze))
                                     ->_and()
                                     ->_where(array('dlaKogo','=', $dla_kogo))
                                     ->_where_close()
                                     ->_order_by('id')
                                     ->query();
        var_dump($test_query);
If you cool with your query, you can run it by change '->query()' to '->execute()'. Happy debugging.


Messages In This Thread
Problem with MVC and passing the query data - by El Forum - 06-24-2011, 04:02 PM
Problem with MVC and passing the query data - by El Forum - 06-24-2011, 04:06 PM
Problem with MVC and passing the query data - by El Forum - 06-24-2011, 04:19 PM
Problem with MVC and passing the query data - by El Forum - 06-24-2011, 04:47 PM
Problem with MVC and passing the query data - by El Forum - 06-24-2011, 05:15 PM
Problem with MVC and passing the query data - by El Forum - 06-24-2011, 05:41 PM
Problem with MVC and passing the query data - by El Forum - 06-24-2011, 05:49 PM
Problem with MVC and passing the query data - by El Forum - 06-24-2011, 05:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB