Hi there, I currently have this (working) MYSQL Query :-

$query="SELECT * FROM tablename WHERE (`groupa` = '$group') ORDER BY
montha DESC, filea DESC LIMIT $limita";

Basically $limita is a number - EG 100, 200 etc... - & works well..

Ive got another field called datea EG :- "30th January" etc...

I'm wondering, if its possible to use the above query, but limit the
query by 30 'unique' datea

However if there are 10 records for a particular date, I want ALL 10
records for that date... - So I could have 1000 records in total, but
for the last 30 days...

Im thinking - limit (distinct `datea`,30)  ?? or something....

although Im googling for tutorials on distinct / limit - But cant
locate a suitable one (as yet)...


----
G
NZ community groups - [EMAIL PROTECTED]
Freecycle Auckland :-
http://groups.yahoo.com/group/AucklandFreecycle/

Reply via email to