ID: 48301 User updated by: rmbaba at gmail dot com Reported By: rmbaba at gmail dot com Status: Open Bug Type: ODBC related Operating System: ubuntu 9.4 PHP Version: 5.2CVS-2009-05-16 (CVS) New Comment:
SO any updates about this bug please? Previous Comments: ------------------------------------------------------------------------ [2009-05-17 04:43:28] Eric at juhaynum dot com dot br Hi I'm getting the same error, it ask me to download the file.. ------------------------------------------------------------------------ [2009-05-16 10:34:55] rmbaba at gmail dot com Description: ------------ Hello, I just prepared the server, installed apache, php5 mysql and odbc, I configured the the required files as well , and here is the result when I trying to connect to MS Access database: +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> select * from table; lablablab... Here is a small php code: $conn = odbc_connect("DSN","",""); $select = "SELECT * FROM TABLE"; $result = odbc_exec($conn, $select); while ($row = odbc_fetch_array($result)) { $rowid = $row['name1']; $pwd = $row['password']; } echo "Row id :".$rowid; echo "password : ".$pwd; The problem is, when I browse the file it as me to download it instead of explorer it, although the other projects with php and mysql are working well. Reproduce code: --------------- Here another small code after the tracing: $db = odbc_connect("LOIR","","",SQL_CUR_USE_ODBC); if (!$db) { die('ERROR: Cannot connect!'); } $sql = "SELECT * FROM st_student"; $result = odbc_exec($db, $sql) or die('ERROR: Cannot execute query!'); if (!$result) { exit("Error in SQL: ".$sql); } until now everything is okay unless this while array: while (odbc_fetch_array($result)) { echo odbc_result($result,"name1"); } odbc_close($db); Warning: odbc_fetch_array() [function.odbc-fetch-array]: No tuples available at this result index in /var/www/access.php on line 14 Although when I replace the above fetch array with this: $row = odbc_fetch_array($result); echo $row["name1"]; odbc_close($db); it return one row and when field. Expected result: ---------------- It supposed to return all 300 records in the database. Actual result: -------------- I don't have backtrace.. and I would appreciate your cooperation with this matter, because I'm tired now from it, since 4 days and I'm googling but no result. Cordially, ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48301&edit=1