ID: 19871 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: ODBC related Operating System: W2K Terminal Server PHP Version: 4.2.3 New Comment:
Okay I'm going to assume that you're using the MS ODBC system, which is why the Access and Excel checks worked just fine. Given that nothing has changed base code wise, it suggests to me that the ODBC Driver for Progress is faulty and not PHP in this case. You can turn on SQL Logging to check if PHPs ODBC calls are sending the right requests. Marking this as bogus because if it works with 2 databases using the same ODBC Driver, and the third doesn't, it seems highly likely #3s implementation of ODBC isn't fully there. Previous Comments: ------------------------------------------------------------------------ [2002-10-11 13:41:56] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=19871&edit=1
