ID: 19045
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Feedback
+Status: Open
Bug Type: ODBC related
Operating System: IIS4 on NT4
PHP Version: 4.2.2
New Comment:
how I can turn the logging on ?
Previous Comments:
------------------------------------------------------------------------
[2002-10-02 12:28:21] [EMAIL PROTECTED]
Any chance you can re-do this with logging turned on? I did some
research into this, and believe I've figured it out.... although I'd
like to see if your actions fall into the same series of steps as mine.
------------------------------------------------------------------------
[2002-08-31 00:17:41] [EMAIL PROTECTED]
Interestingly enough some digging into this results in the following
data:
The ODBC standard exec only supports the following options for a SELECT
statement: FROM, WHERE, GROUP BY, HAVING, UNION, and ORDER BY.
So technically doing a SELECT DISTINCT shouldn't ever work. Although
your example seems to disprove this theory. I'm going to have to do
more looking into this as I get time... as I don't think this should be
an issue. It should be a SQL Driver issue, not an ODBC Driver issue.
------------------------------------------------------------------------
[2002-08-30 03:10:23] [EMAIL PROTECTED]
it doesn't work with :
$requete="select distinct POSTE from TEMPSCUMULES";
and it works with :
$requete="select POSTE from TEMPSCUMULES";
------------------------------------------------------------------------
[2002-08-29 16:52:00] [EMAIL PROTECTED]
$stmt1 ="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.
$stmt2 ="select POSTE, LBLPOSTE from TEMPSCUMULES where
SOCIETE='001'and ATELIER='40' and to_char(JOURNEE,'YYYYMMDD') between
'20020701' and
'20020731' order by POSTE"
$stmt3 ="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"
so $stmt2, and $stmt3 work fine.
Have you tried with a simplier select query?
------------------------------------------------------------------------
[2002-08-29 02:45:09] [EMAIL PROTECTED]
For understanding my examples, you have to replace (�) in
'$requete="(�)";' by the query string given below.
The first query string is a select distinct with one table
(TEMPSCUMULES), and it doesn't work. The second one is a select (no
distinct) with one table, and it works fine . And the last one is a
select distinct with two tables (TEMPSCUMULES and GROUPE_MACHINE), and
it works fine too.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19045
--
Edit this bug report at http://bugs.php.net/?id=19045&edit=1