Welcome Guest, Not a member yet? Register   Sign In
[solved] using active records WHERE with now()
#2

[eluser]bretticus[/eluser]
try printing the compiled query out to your browser:

Code:
function get_funerals()
    {
        $this->db->where('visitation >', 'NOW()');
        $query = $this->db->get('funerals');
        echo $this->db->last_query();
        return $query->result();
    }

or turn on profiling to get a look:

Code:
function get_funerals()
    {
        $this->output->enable_profiler(TRUE);
        $this->db->where('visitation >', 'NOW()');
        $query = $this->db->get('funerals');
        return $query->result();
    }

Oh by the way, when you return $query->result() you are just returning one row.


Messages In This Thread
[solved] using active records WHERE with now() - by El Forum - 03-12-2010, 12:10 PM
[solved] using active records WHERE with now() - by El Forum - 03-12-2010, 12:14 PM
[solved] using active records WHERE with now() - by El Forum - 03-12-2010, 12:19 PM
[solved] using active records WHERE with now() - by El Forum - 03-12-2010, 12:20 PM
[solved] using active records WHERE with now() - by El Forum - 03-12-2010, 12:23 PM
[solved] using active records WHERE with now() - by El Forum - 03-12-2010, 12:24 PM
[solved] using active records WHERE with now() - by El Forum - 03-12-2010, 12:24 PM
[solved] using active records WHERE with now() - by El Forum - 03-12-2010, 12:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB