Well, by now i have found a way to work around the problem, still the problem is not solved, you may want continue thinking about it:
start with this: iSession iUser sSession ---------- ---------- ----------------- 1 41 no 2 41 wanted 3 42 no 4 42 wanted 5 43 no 6 43 wanted and end up with that: iSession iUser sSession ---------- ---------- ----------------- 2 41 wanted 4 42 wanted 6 43 wanted Do it without a subselect and do it with one sql statement SELECT * FROM O_Sessions AS first, O_Sessions AS second WHERE first.iSession=MAX(second.iSession) AND first.iUser=second.iUser so far is the only solution, but does not work with mysql :-( rain outside, 14:45, three hours after breakfast and now heading for some new problems, robo :-) --------------------------------------------------------------------- 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