I would create 2 classes : UsersCollection (represents all users, with methods such as add, count, delete, find),
UserObject (represents an instance of a user, with name, password, creation date properties and edit method).
In the UsersCollection class :
function aGetUsersByCreationDate($creationDate){
// SQL stuff to run query here
// Code to put results from query into array
return $array
}
I assume that the UserObject class has a constructor which allows you to pass a user reference and populate the class with the data from that user -
You can then build a page which does something like :
$colUsers = new UsersCollection;
$aUsers = $colUsers->aGetUsersByCreationDate("1 Jan 2000");
while (list($key, $value) = each($aUsers)){
$objUser = new UserObject($value)
echo "User name : " . $objUser->name;
}
Hope this helps...
Nev