Welcome Guest, Not a member yet? Register   Sign In
from controller to view , how?
#1

[eluser]JayArias[/eluser]
below is my controller , for the main page. How would i go buy adding the query to my VIEW cause if i put the query code in the view it screws up. ive tried several things.

Code:
<?php

    class Home extends Controller{
    
        function Home()
        {
            parent::controller();
        }
        function index()
        {
            
            $this->load->database('default');
            $fetch_news = $this->db->query("SELECT * FROM `news` WHERE `verified` = '1' ORDER BY `id` DESC");
            $news = $fetch_news->row_array();
            $this->load->view('default_view');
        }        
    }


Messages In This Thread
from controller to view , how? - by El Forum - 10-23-2008, 12:58 PM
from controller to view , how? - by El Forum - 10-23-2008, 01:07 PM
from controller to view , how? - by El Forum - 10-23-2008, 01:41 PM
from controller to view , how? - by El Forum - 10-23-2008, 02:50 PM
from controller to view , how? - by El Forum - 10-23-2008, 02:51 PM
from controller to view , how? - by El Forum - 10-24-2008, 09:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB