From: [EMAIL PROTECTED] Operating system: W2K Terminal Server PHP version: 4.2.3 PHP Bug Type: ODBC related Bug description: Query returning all the same data
I am running a Progress Database with a ODBC data source entry. I have a test table with 4 records in it. Each record has three fields. ID, Name and Total. The information in the table is... Index on Name. ID Name Total 1 Horse 21 2 Cow 30 3 Eagle 14 2 Cow 34 Here is my actual code. $DBName = "php"; $TableName = "PUB.table1"; $Query = "SELECT * from $TableName"; $Link = odbc_connect ($DBName,$User,$Password); $Results = odbc_do($Link, $Query); print odbc_result_all($Results); What I expect to see was four lines of data display as above. What I got was... ID Name Total 2 Cow 30 2 Cow 30 2 Cow 30 2 Cow 30 I have tried 10-15 different ways to access the $Results to no avail. Then I decided to see if it was SQL problem. Using another SQL interface to the Progress Database, I performed the same query and got the expected results. Next I decided to see if it was an ODBC problem. My first approach was to set up a query within a MSExcel spreadsheet. This worked just fine and got the expected results. This told me that the ODBC driver used to access the Progress Database was working. Next I wanted to see if it was an PHP/ODBC command problem. So I set up an MS Access database and created an ODBC entry for it using the Microsoft driver for ODBC/mdb. I got the expected results. In fact the only difference between the php script for MS Access and Progress was the name of the Data Source. I also didn't need to use "PUB" in front of the table name. I used the exact same code to query and print the results. This leads me to believe that the problem here is the interaction of php and the driver for Progress. The ODBC driver that is shipped with Progress is MERANT 3.60 32-BIT Progress SQL92 v9.1C 3.60.00.00 Again, everything points to a problem between php and the driver for Progress. Using the same driver in both Excel, MS Word works just fine. I would appreciate it if someone would look into this for me. Thanks -- Edit bug report at http://bugs.php.net/?id=19871&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19871&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19871&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19871&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19871&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19871&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19871&r=support Expected behavior: http://bugs.php.net/fix.php?id=19871&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19871&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19871&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19871&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19871&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=19871&r=dst IIS Stability: http://bugs.php.net/fix.php?id=19871&r=isapi