Welcome Guest, Not a member yet? Register   Sign In
Random Quote
#3

[eluser]georgerobbo[/eluser]
Okay. Thank you. But I'm doing something really stupid which I can't quite figure out. I can't seem to select this data from the database, I keep getting an error.


Code:
<div id="panel">
            <div class="wrapper">
                <div id="panel_ident"></div>
                <div id="panel_memo">
                    <h3 class="memo_&lt;?php echo $panelbase['Object_ID']; ?&gt;"><span>&lt;?php echo $panelbase['Object_Desc']; ?&gt;</span></h3>
                </div>
            </div>
        </div>


Code:
&lt;?php

class Welcome extends Controller {

    function Welcome()
    {
        parent::Controller();    
    }
    
    function index()
    {
        $data['title'] = 'Home';
        
        $this->load->model('Panel');
        $data['panelbase'] = $this->Panel->get_memo();
        
        $this->load->view('meta', $data);
        $this->load->view('header');
        $this->load->view('panel', $data);
        $this->load->view('index');
        $this->load->view('footer');
    }
}

Code:
&lt;?php

class Panel extends Model {

    function Panel()
    {
        parent::Model();
    }
    
    function get_memo()
    {
        $sql = "SELECT Object_ID, Object_Desc FROM panelbase";
        $query = $this->db->query($sql);
        return $query->result_array();
    }
    
}


Messages In This Thread
Random Quote - by El Forum - 09-04-2009, 10:37 AM
Random Quote - by El Forum - 09-04-2009, 10:50 AM
Random Quote - by El Forum - 09-04-2009, 11:06 AM
Random Quote - by El Forum - 09-04-2009, 12:15 PM
Random Quote - by El Forum - 09-04-2009, 01:27 PM
Random Quote - by El Forum - 09-04-2009, 01:51 PM
Random Quote - by El Forum - 09-04-2009, 08:00 PM
Random Quote - by El Forum - 09-05-2009, 04:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB