MarkR wrote:I also recommend that you stop using that host. MySQL 3.x is ABSOLUTELY PREHISTORIC.
It is only of archaeological interest, in my opinion. It lacks SO MANY useful features, there is no point developing against it (unless you're into ancient history).
Mark
I concur. When MySQL 3.x ruled the land, so did PHP 3.0, postgresql 7.1, java SDK 1.2, apache 1.3 or so, Red Hat Linux 5.2, etc...
Can you imagine a hosting company having any of those other versions on their server? Other than the odd occasional occurance of apache 1.3 because they're using some module that doesn't yet work under 2.x, you don't really see any of those, and there's a dang good reason for it.
But back to the query at hand.
This form:
select * from sometable group by onefield
is absolutely wrong, unless onefield is a primary key, and even then, most databases won't let you run it. It's a mysqlism that generally results in a random assortment of data, which could change each time you run it.
for instance:
create table test (id int, val text);
insert into test values (1,'abc');
insert into test values (1,'def');
select * from test group by id
could return either 1,abc OR 1,def and you have no clue which one you'll get. If you're building a query like select * from table group by onefield all the time, you need to stop, get a cup of coffee, and rethink what you're trying to do.