Hello all,
Here is my situation: I have a PHP base class that looks something like this:
class Table {
static $table_name = "table";
public function selectAllSQL(){
return "SELECT * FROM " . self::$table_name;
}
}
And a subclass that is like this:
class MyTable extends Table {
static $table_name = "my_table";
}
Unfortunately, when I do:
MyTable::selectAllSQL()
I get:
"SELECT * FROM table"
instead of my desired result,
"SELECT * FROM my_table"
It looks like this can be accomplished in php 5.3 using late static bindings, but is there any way I can accomplish this behavior in PHP 5.2.x?