I tried to do the following:
class some_class {
var $something;
function select_something () {
$query = "SELECT something FROM something_tb WHERE something =
'$this->something'";
$db = new db_sql;
$db->query($query);
$db->next_record ();
$this->something = $db->Record["something"];
}
}
class another_class {
var $something_else;
function select_something_else () {
$query = "SELECT something_else FROM something_else_tb";
$db = new db_sql;
$something_class = new some_class;
$db->query($query);
while ($db->next_record ()) {
$something_class->something = $db->Record["something_else"];
$something_class->select_something ();
}
}
}
PHP is throwing up an error stating that I can't nest classes. Is this true?
What is the reason for not being able to nest classes? Is there any way
around it or am I thinking about classes incorrectly?
Any help would be greatly appreciated. Thanks very much.
--
Clarence Kwei
[EMAIL PROTECTED]
ScienCentral, Inc.
(212) 244-9577 ext. 118
<http://www.stn2.com>
<http://www.sciencentral.com>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]