I have a function, which I call setter(). This function formats certain varibles, ready for and SQL feed
for eg
$instance -> table = "members";
will be formatted to
$this->table = "FROM ".$this->table;
There are serveral other memer functions that use this function so that the SQL query is in the proper syntax.
The problem I have is that the other member functions also use each other to do the job. This results in multiple call to the setter() function. Consequently the query fed into SQL sometimes looks like this :
SELECT * FROM FROM FROM
.
As you can see, there are more FROMs than SQL can accomodate.
When I migrated to PHP5, I discovered the __contruct() functions, which I thought I could use to load this setter() function so I dont have to call it in the other member functions.
The problem I have come across is that the __construct() is called BEFORE all the member variables have had the chace to load.
The result is that the setter() doesnt have any data to work on and so becomes useless.
Any suggestions appreciated