Welcome Guest, Not a member yet? Register   Sign In
query big problem
#12

[eluser]polish[/eluser]
Xwero cam You lokinng on my controller function what I must change so that it is ok???

Code:
function show()
    {
    $news_id = $this->uri->segment(3);
    $this->response['content'] = '<h1><center><a href="'.site_url('comment/com_add/'.$news_id).'">Comments</a><center></h1>';
    IF(isset($news_id) and is_numeric($news_id))
        {
        $this->load->model('Comments');
        $output = $this->Comments->get_news_item($news_id);
        $content = '';
        $adm = Comment::_check_login();
        if ($output->num_rows() > 0)
            {
            foreach($query->result() as $item)
                    {
                    $item->admin = $adm;
                    $this->response['content'] .= $this->load->view('com/com_loop', $item, True);
                    }
            }
        else
            {
                $content = '<h1><center>No Comments</center></h1>';
            }
        //$this->response['content'] = $content;
        }
    else
        {
        $this->response['content'] = '<h1><center>Bad Link</center></h1>';
        }
    $this->load->view('index', $this->response);
    }

This is My first application and I will be very grateful for the help me!


Messages In This Thread
query big problem - by El Forum - 04-24-2009, 03:45 AM
query big problem - by El Forum - 04-24-2009, 04:18 AM
query big problem - by El Forum - 04-24-2009, 04:22 AM
query big problem - by El Forum - 04-24-2009, 04:33 AM
query big problem - by El Forum - 04-24-2009, 04:34 AM
query big problem - by El Forum - 04-24-2009, 04:49 AM
query big problem - by El Forum - 04-24-2009, 04:54 AM
query big problem - by El Forum - 04-24-2009, 08:48 AM
query big problem - by El Forum - 04-24-2009, 11:57 AM
query big problem - by El Forum - 04-25-2009, 12:44 AM
query big problem - by El Forum - 04-25-2009, 02:32 AM
query big problem - by El Forum - 04-26-2009, 03:35 AM
query big problem - by El Forum - 04-26-2009, 04:53 AM
query big problem - by El Forum - 04-26-2009, 05:09 AM
query big problem - by El Forum - 04-27-2009, 12:46 AM
query big problem - by El Forum - 04-27-2009, 01:04 AM
query big problem - by El Forum - 04-27-2009, 05:54 AM
query big problem - by El Forum - 04-27-2009, 06:16 AM
query big problem - by El Forum - 04-27-2009, 01:04 PM
query big problem - by El Forum - 04-28-2009, 06:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB