Welcome Guest, Not a member yet? Register   Sign In
Modelling Questions
#10

[eluser]tonanbarbarian[/eluser]
Ok there is a minor issue in the CI way of doing things that you put up
after you load the model you reference it by the model name
Code:
$this->load->model('Person');
$this->person->getEmail(32);
...

Ok for what you want to do why not do something like this... just one extra line really
Code:
$this->load->model('Person');
$this->person->setId(32);
$this->person->getId( );
$this->person->getEmail( );
$this->person->getWebsite( )->getTitle( );

However if your getId method was to retrieve the data for the record with the specified id then my original way is basically the same


Messages In This Thread
Modelling Questions - by El Forum - 11-29-2007, 12:14 PM
Modelling Questions - by El Forum - 11-29-2007, 01:44 PM
Modelling Questions - by El Forum - 12-01-2007, 10:19 AM
Modelling Questions - by El Forum - 12-01-2007, 11:35 PM
Modelling Questions - by El Forum - 12-02-2007, 09:42 PM
Modelling Questions - by El Forum - 12-02-2007, 11:40 PM
Modelling Questions - by El Forum - 12-03-2007, 12:28 AM
Modelling Questions - by El Forum - 12-04-2007, 07:55 PM
Modelling Questions - by El Forum - 12-04-2007, 11:11 PM
Modelling Questions - by El Forum - 12-04-2007, 11:55 PM
Modelling Questions - by El Forum - 12-05-2007, 12:39 AM
Modelling Questions - by El Forum - 11-30-2008, 07:11 AM
Modelling Questions - by El Forum - 11-30-2008, 11:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB