Posted January 21 '10 at 12:36 AM
Posts: 7
How would I go about getting the same results from
class newCats {
public $go;
private $id;
public function __construct() {
$this->go = uniqid();
}
public function listData() {
return "id: {$this->id} go: {$this->go}";
}
}
$result = mysql_query(
"SELECT * FROM wr_categories ".
"ORDER BY ordering"
);
while($obj = mysql_fetch_object($result, 'newCats') ){
echo $obj->listData()."<br /> \n";
}
but putting
$result = mysql_query(
"SELECT * FROM wr_categories ".
"ORDER BY ordering"
);
in its own function within my newCats class?