NYCPHP Meetup

NYPHP.org

[nycphp-talk] OT - MySQL select question

Aaron Fischer agfische at email.smith.edu
Thu Dec 7 12:00:41 EST 2006


I did a mysql_get_server_info and it returns as 3.23.58, so I guess 
that's why Andy's query was returning errors.

I guess 3.23.58 is a bit older?  Seems like most people are on version 4 
and some are on version 5?

-Aaron


Rob Marscher wrote:
> If you're using a MySQL version earlier than 4.1, subqueries aren't 
> available.  Maybe that's why you got an error with Andy's query.
> 
> That's interesting about the query not working in Oracle.  I wonder if 
> it's because field_name isn't specifically listed in the SELECT - like 
> it doesn't like the "GROUP BY field_name" when * is used for the field 
> list?  I've read that MySQL allows you to GROUP BY fields not listed in 
> the field list, but other DBs give errors.
> 
> -Rob
> 
> Aaron Fischer wrote:
> 
>> That did it, thanks Rob and Andy.
>>
>> Rob's query did the trick.  I was getting a MySQL error with Andy's 
>> that I hadn't been able to figure out.
>>
>> Cheers,
>>
>> -Aaron
>>
>>



More information about the talk mailing list