From: christophe.bidaux@netcourrier.com
Operating system: IIS4 on NT4
PHP version: 4.2.2
PHP Bug Type: ODBC related
Bug description: SELECT DISTINCT with just ONE table doesn't work
My problem is the same described in the 13167 and 7789 bug reports, but I
don't know how to change a bug report status...
I have exactly the same problem with the currently last PHP version/CGI
(4.2.2) : I have no result (IIS "stops" the script, and the page is never
sended to the client) with an ODBC/Oracle query with a "select distinct".
But, I have something to add : the problem appears with a query with just
ONE table in the "select distinct", but not, in the same conditions with a
query with two tables linked in the "select distinct".
----------
$gp=odbc_pconnect("INTRANET gp","user","password");
$requete="(°)";
$db_query=odbc_exec($gp,$requete);
odbc_fetch_into($db_query,$db_array);
with (°)="select distinct POSTE, LBLPOSTE from TEMPSCUMULES where
SOCIETE='001' and ATELIER='40' and to_char(JOURNEE,'YYYYMMDD') between
'20020701' and '20020731' order by POSTE", it doesn't work.
with (°)="select POSTE, LBLPOSTE from TEMPSCUMULES where SOCIETE='001' and
ATELIER='40' and to_char(JOURNEE,'YYYYMMDD') between '20020701' and
'20020731' order by POSTE" or (°)="select distinct GROUPE, POSTE, LBLPOSTE
from TEMPSCUMULES, GROUPE_MACHINE where POSTE=MACHINE and SOCIETE='001'
and ATELIER='40' and to_char(JOURNEE,'YYYYMMDD') between '20020701'
and
'20020731' order by GROUPE, POSTE", it works fine.
The driver is "Oracle ODBC Driver 8.00.06.00"
Merci.
Christophe
--
Edit bug report at http://bugs.php.net/?id=19045&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19045&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19045&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19045&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19045&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19045&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19045&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19045&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19045&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19045&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19045&r=globals