php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7779 ODBC query : select distinct ...
Submitted: 2000-11-13 05:56 UTC Modified: 2001-05-08 10:55 UTC
From: nik at cyberdude dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.3pl1 OS: Windows 2000
Private report: No CVE-ID: None
 [2000-11-13 05:56 UTC] nik at cyberdude dot com
(PHP Version 4.0.4-dev on Windows 2000 without SP1)

php.exe and the isapi module both crash with a query like:
$query = "select distinct date from datetest";
The query without "distict" works fine.

ISAPI modules says: PHP has encountered an Access Violation at 04C2EA86, php.exe quits with no special message.

There is no error message from the ODBC driver when the same query is (successfully) issued directly through an odbc client. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-18 22:04 UTC] kalowsky@php.net
can you please try this with a more recent version of PHP?  with my limited resources, attempting this on win98SE i cannot reproduce the error... so either its been fixed, or it may be win2k specific...
 [2001-05-08 10:55 UTC] kalowsky@php.net
no user feedback.  considered fixed in cvs.  if this is untrue, please reopen the bug.
 [2002-10-08 21:03 UTC] fogbank at fogbank dot org
It happens to me, too...win98, personal web server, filemaker pro ODBC driver, php 4.2.3 used as CGI.

"select distinct field from table" crashes php.exe but works fine with every other ODBC query tool I tried.
The only difference between my case and the original bug report is that the crash doesn't happen immediately, but only after I try to examine the query results.

i.e.:

$resultid = odbc_do($connectionid, "select distinct field from table");
odbc_free_result($resultid);

works fine, but

$resultid = odbc_do($connectionid, "select distinct field from table");
odbc_fetch_into($resultid, $resultarray);
// or odbc_fetch_row, or any other function which
// tries to make use of the results

crashes.

"select field from table" works fine.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC