Welcome Guest, Not a member yet? Register   Sign In
Catching value from Model
#1

Here is the thing, I have a model called cliente and has a field name puntos. I create a instance of that model on the controller using $data['cliente']=$this->new_cliente->get_cliente('1128434875'); and It works fine

I need to catch the field puntos from $data['cliente'] in the controller in order to compare it with other field.

I know I can get that value on a view, but I need to do it in the same controller where I created it.

HELP
Reply
#2

How about this?

Code:
$data['cliente']->puntos
Reply
#3

I usually use the following structure:


PHP Code:
if (is_array($client $this -> model -> get_client($client_id)))
{
   $client['field_name] // do something with value

Sergey Koshkarev
http://sergeykoshkarev.com
Reply




Theme © iAndrew 2016 - Forum software by © MyBB