Welcome Guest, Not a member yet? Register   Sign In
Getting last months data from database
#1

Hi there,

I am trying to work out how I can get the previous months results from my database.  This is what I have so far but I just cannot figure out what should be in the where line.

PHP Code:
public function get_last_month(){
        $this->db->select('*');
        $this->db->from('test_table');
        $this->db->where('date''');
        $query $this->db->get();
        return $query->result();
    

Can anyone help please?

Thanks,

Doomie
Reply


Messages In This Thread
Getting last months data from database - by doomie22 - 08-25-2016, 08:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB