Inside your table class, just add a member variable which is an instance of the columns class.
For example (only an example!):
public function __construct()
$this->columns = new columns();
// Then you can do:
$table = new table();
Salath, I think I'm gonna choose your solution to this problem, but now i've got another problem - how to get to the table object from the columns object,
what i did is something like this, and i want to know if it's correct :
$this->parent = $parent;
public function a()
$this->name = "asdf";
$this->iClass = new inner_class($this);
not looking at this properly, i would say the only other way of doing it is to use an abstract.
Just to clear somthing up, doesnt a table have columns anyway (thinking from an object point of view, a table has columns and rows), so the table object should have the ability to add columns so i dont see the use in creating an extra object for columns, im sorry if im just being a bit thick if that isnt the case, i must be on one of my stupid head days.
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)