#19045 [Opn->Fbk]: SELECT DISTINCT with just ONE table doesn't work
| From: | kalowsky@php.net | Date: | Thu, 29 Aug 2002 02:52:25 +0000 |
| Subject: | #19045 [Opn->Fbk]: SELECT DISTINCT with just ONE table doesn't work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18109@lists.php.net to get a copy of this message | ||
ID: 19045
Updated by: kalowsky@php.net
Reported By: christophe.bidaux@netcourrier.com
-Status: Open
+Status: Feedback
Bug Type: ODBC related
Operating System: IIS4 on NT4
PHP Version: 4.2.2
New Comment:
i don't see a select distinct happening on one table here, are you sure
the proper code is documented below?
Previous Comments:
------------------------------------------------------------------------
[2002-08-22 09:23:19] christophe.bidaux@netcourrier.com
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 this bug report at http://bugs.php.net/?id=19045&edit=1