Jump to content


Pretty stupid problem ... where method is not working

where problem

  • Please log in to reply
No replies to this topic

#1 James

James

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 11 July 2019 - 06:34 PM

Hi

 

It's a very first post here, so welcome guys.

I'm just writting a simple webapp for my client and I looks like GC delivers almost all functionality what I need.

 

But there is one problem. I'm just messing around documentation and API and I'm trying to get values with where method.

But ... at the end nothing is changed :/

public function __construct()
    {
        parent::__construct();
        $this->load->database();
        $this->load->helper('url');
        /* ------------------ */

        $this->load->library('grocery_CRUD');
    }

    public function index()
	{
		$this->load->view('welcome_message');
	}

	public function employees(){
	    $crud = new grocery_CRUD();
	    $crud->where('jobTitle','Sales Rep')
	    $crud->set_table('employees');
	    $output = $this->grocery_crud->render();
        $this->example_output($output);
    }



    private function example_output($output = null){
	    $this->load->view('databaseView',$output);
    }
}

As you see I just added one line to a code what you can see in examples.

The question is: where is a problem ? ;P Of course I searched google for solution but I found nothing :(






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users