View Single Post
  #1 (permalink)  
Old August 9th, 2012, 03:35 PM
Chameleonxxx Chameleonxxx is offline
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Class DataBoundObject in Chapter 7

Hello,

chapter 7 of Professional PHP6 show a solution for link php Object and DB table, that is ORM ( Object Relation Mapping ).
THe implementation of thi pattern is DataBoundObject class, very cool solution.
How can I handle relation many to many with this object.
If I have a situation like this:

Table Student:
ID
Name
Table Course
ID
Name
Table Student_has_Course
student_id
course_id
data
vote
How can I handle ( CRUD ) the table Student_has_Course in right OOP?

Thanks a lot

Chameleon