Yii Framework Forum: Model Class For Multiple Data - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Model Class For Multiple Data what and how to create a such a model Rate Topic: -----

#1 User is offline   EndErr 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 05-June 12

Posted 02 March 2013 - 03:33 AM

Hi,
Given some tables/models: users, user_addresses, basket, products.
Need to build a model that will allow to manage orders with data stored in tables above.
None of the data could be changed or added trough that model, just change of 2 fields in basket table (payed_ammount, status).
e.g. Orders: OrderNr (from basket.orderid), TotalSumm (from sum(products.price) in basket), ...
So i'm trying to do that with a CFormModel, but not sure if it is right.
What do i need to have in my model (the standards ones)?
Also for class attributes i would like to use setters and getters but using __get requires CController or CActiveRecord.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users