Hi,
I have a trouble with the group function using php Mysql. Performing the following :
[code=php]“SELECT * FROM table WHERE owner LIKE’$username’ GROUP BY date”
returns the first row fitting the condition even if several rows do fit the condition.
What I would need is to return the maximum of each column of all the rows fitting the condition (I have lots of columns).
For instance, with the following table,
id=1 – owner=you – bla1=aaa – bla2=[COLOR=”red”]222
id=2 – owner=you – bla1=[COLOR=”Red”]bbb[COLOR=”red”]333
I would like to get :
—–> owner=you – bla1=[COLOR=”Red”]bbb[COLOR=”red”]222[COLOR=”red”]333
Can anybody help me ?
Many thanks in advance!!!