Have you tried something like this, SELECT iSession FROM O_Sessions GROUP BY iUser ORDER BY iSessions DESC;
Mike ----- Original Message ----- From: "Robo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 16, 2002 3:39 PM Subject: ??? Simple sql-question: SELECT iSession FROM O_Sessions GROUP BY iUser > I want the latest (highest) iSession to be selected: > > SELECT iSession FROM O_Sessions GROUP BY iUser > > Because of GROUP BY, allways the first(!) recordset for iUser is selected. > But i want the last recordset to be selected :-( > > How can this be done ? > (mySQL) > (iSession ist the primary key => latest=highest. filling the primary key from 4294967295 down to 0 > does not work) > > greetings from germany (getting rather dark), > roland (Bollmann) > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php