> Doesn't seem to work, how would I print that out with PHP?

The results will come back sorted by name, then time.  While processing each
row, you'll need to keep track of when the username changes, something like
this (this is just rough code, not quite valid PHP):

    $username = '';
    while ($data = fetchrow)
    {
        if ($username != $data['name'])
        {
            $username = $data['name'];
            print "Logins for " . $username . "\n\n";
        }
        print $login . "\n";
    }

Keep track of the current user.  As you examine each record, check if it's
different than the current one.  If it is, save it as the current username,
and print the login info.  If it's the same, just print the login info.


- Darryl

 ----------------------------------------------------------------------
  Darryl Friesen, B.Sc., Programmer/Analyst    [EMAIL PROTECTED]
  Education & Research Technology Services,     http://gollum.usask.ca/
  Department of Computing Services,
  University of Saskatchewan
 ----------------------------------------------------------------------
  "Go not to the Elves for counsel, for they will say both no and yes"



-- 
PHP Database 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]

Reply via email to