I'm using the odbc family of php routines to do a "SELECT DISTINCT" query on an SQL Server database. Oddly enough, the result I get is a subset of the result I should get--and do get if I use perl (Win32:😮DBC) or a direct query on the server.
Is this a known issue? Is there a way to work around this? I'd rather use PHP than Perl if I can for this job.
Thanks, Bill
I've come across some db's that do not support DISTINCT and the workaround I used with those was
instead of SELECT DISTINCT a,b,c FROM tablename
I used SELECT a,b,c FROM tablename GROUP BY a,b,c
hth