In my controller i have code such as this;

 

$items = new Default_Model_Items();

$id = (int)$this->_request->getPost('id');

$items->fetchrow($id);

$list_id = $items->getList_id();

 

This is what I am trying to do.

 

1.  Create a new instance of the model Default_Model_Items.

2.  Get the primary key from a parameter in the url (id).

3.  Fetch the record from the database and store it in the model.

4.  Get the value of a the field LIST_ID which should now be stored in the
model, and returned from the getList_ID function.

 

My problem is the value of LIST_ID does not get returned.

I put some debug code in the model, and i can see that the value does get
stored in the model. But when i try to retrieve it i get nothing.

 

Is my code above incorrect? It is as though i am looking at a different
instance of the model when i try to retrieve the value.

 

Any help appreciated.

 

Steve

 

 


Williams are pleased to announce our attendance at HOST 2009 from 23 - 27th 
October in Milan.
Come and visit us on Stand G16 in Hall 5 to view a selection of our range of 
refrigeration products and solutions.
If you would like to arrange an appointment with us during Host please contact:
kmagu...@williams-refrigeration.co.uk
Otherwise drop by and see us on our Stand where our sales team will be on hand 
to introduce you to the range and discuss any requirements with you.

Williams Refrigeration is a trading name of AFE Group Limited.
Registered in England & Wales under Registered Number 3872673.  Registered
Office Address - Bryggen Road, North Lynn, Industrial Estate, Kings Lynn, 
Norfolk, PE30 2HZ

Williams Refrigeration reserves the right to block any email attachment we deem 
inappropriate and to also reject any inbound connections from Blacklisted 
servers. Any email meeting the above criteria will be automatically rejected 
without notification given to the original sender.

NOTE: In accordance with the Data Protection Act compliance, all Bulk sends 
should use the BCC field as much as possible.

This e-mail and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error or are having trouble sending email to 
Williams please notify the system administrator - 
postmas...@williams-refrigeration.co.uk

Any views or opinions expressed in this e-mail are those of the sender and do 
not necessarily coincide with those of Williams Refrigeration or the AFE Group.

Reply via email to