Welcome Guest, Not a member yet? Register   Sign In
Total n00b PHP loop question
#4

[eluser]Einspruch[/eluser]
Thank you for your quick responses. Below are the model and controller.

Code:
function bfg_charts()
    {
    $this->db->select('Portal_Rankings.Date');
    $this->db->select('Portal_Rankings.Title');
    $this->db->select('Portal_Rankings.Rank');
    $this->db->select('DATEDIFF((Portal_Rankings.Date),("2009-11-20")) AS Days');
        $this->db->from('Portal_Rankings');
        $this->db->join('Sites', 'Portal_Rankings.SiteID = Sites.ID');
        $this->db->where('Portal_Rankings.SiteID', '1');
        $where = "(Portal_Rankings.Title like 'Samantha Swift and the Golden Touch%'
            OR Portal_Rankings.Title like 'Midnight Mysteries%')";
        $this->db->where($where);
        $this->db->order_by('Portal_Rankings.Title', 'ASC');
        $query = $this->db->get();
        return ($query->num_rows() > 0)? $query->result() : FALSE;
    }


Code:
function bfg_charts()
    {
        $this->load->model('rankings_model');
        $data['bfg_charts'] = $this->rankings_model->bfg_charts();
        $this->load->view('rankings/bfg_charts', $data);
    }

Hope this helps, and I really appreciate the assistance.


Messages In This Thread
Total n00b PHP loop question - by El Forum - 11-28-2009, 05:26 PM
Total n00b PHP loop question - by El Forum - 11-28-2009, 05:59 PM
Total n00b PHP loop question - by El Forum - 11-28-2009, 06:44 PM
Total n00b PHP loop question - by El Forum - 11-29-2009, 01:10 AM
Total n00b PHP loop question - by El Forum - 11-29-2009, 03:13 AM
Total n00b PHP loop question - by El Forum - 11-29-2009, 05:35 AM
Total n00b PHP loop question - by El Forum - 11-29-2009, 05:59 PM
Total n00b PHP loop question - by El Forum - 11-29-2009, 06:49 PM
Total n00b PHP loop question - by El Forum - 11-30-2009, 04:07 PM
Total n00b PHP loop question - by El Forum - 11-30-2009, 04:32 PM
Total n00b PHP loop question - by El Forum - 11-30-2009, 06:44 PM
Total n00b PHP loop question - by El Forum - 11-30-2009, 07:00 PM
Total n00b PHP loop question - by El Forum - 12-17-2009, 03:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB