Your select statement has 4 problems.
When you use groupby you have to order by that column first.
eg.,group by field3 order by field3 , nr
Even if you use as in 1st point it won't work. To my knowledge, group by does not work when there is aggregate function is in select statement. You can have aggr functions in where clause but not in select arguments while using Group by.
3.What I understood was, you are trying to get maximum of nr column and corresponding values of field1, field3 where field2='mika'.
In that case the final row is only one. Why do you need groupby and order by?
You just need,
SELECT max(nr),field1,field2,field3 FROM table WHERE field2 = 'mika';
4. The 3rd point also won't work. Because
max(nr) and field1 or field3 does not belong to a single group. So you need to find out max(nr) first then use that to get field1 and field3.
like this,
SELECT max(nr)FROM table WHERE field2 = 'mika';
Now you get max(nr) in some variable say, maxnum.
SELECT nr, field1,field2,field3 FROM table WHERE (field2 = 'mika' and nr = maxnum) ;
(if you want all 4 columns in a row. If not you can select only field1&3).
Try to run this directly first in the database. Then try in PHP. Because in PHP aggre functions give trouble.
Hope this helps
-S