Extracting Data via Model |
[eluser]jzmwebdevelopement[/eluser]
Hey, What do I put in my model function to enable me to call it from my controller like this: Code: $this->model->model_function->value I currently have: Code: public function getCompanyDetails()
[eluser]InsiteFX[/eluser]
Load the database and your model in your controller!
[eluser]jzmwebdevelopement[/eluser]
[quote author="InsiteFX" date="1333772186"]Load the database and your model in your controller! [/quote] Opps sorry I have now updated the question I was meaning the model function
[eluser]InsiteFX[/eluser]
Controller: Code: $data['name'] = $this->model_name->function_name->();
[eluser]jzmwebdevelopement[/eluser]
[quote author="InsiteFX" date="1333772905"]Controller: Code: $data['name'] = $this->model_name->function_name->(); InsiteFX. In my controller I have the following line: Code: $data['companyName'] = $this->quote->getCompanyDetails->$companyName; I am getting Undefined variable in my view in my model do I have to write Code: public function ($field){
[eluser]InsiteFX[/eluser]
You need to read up on CodeIgniter and Databases because you dont understand anything about it! CodeIgniter Users Guide - The Database Class |
Welcome Guest, Not a member yet? Register Sign In |