|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38310 odbc_fetch_row(): 8 is not a valid ODBC result resource
Submitted: 2006-08-03 10:05 UTC Modified: 2007-08-01 01:00 UTC
Avg. Score:4.6 ± 0.5
Reproduced:9 of 9 (100.0%)
Same Version:1 (11.1%)
Same OS:6 (66.7%)
From: suneelpro at rediffmail dot com Assigned:
Status: No Feedback Package: ODBC related
PHP Version: 5.1.4 OS: windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-08-03 10:05 UTC] suneelpro at rediffmail dot com
pls provide source code for connection to access and display the desired information (selecting of fields )in php.

Reproduce code:
function getListofPersonalDet()
 {$connect = odbc_connect("msaccess","root","root") or die("Couldn't connect to datasource."); 
echo $query = "select * from personal_details"; 
$result = odbc_prepare($connect,$query); 
while (odbc_fetch_row($result)) {
for ($y = 1; $y <= odbc_num_fields($result); $y++) {
$arr[$x][$y] = odbc_result($result,$y);
if ($x > 1)
 return $arr;
echo $arr[1][1]; 

Expected result:
array list of information framed in html using php

Actual result:
Warning: odbc_fetch_row(): 8 is not a valid ODBC result resource


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-24 15:30 UTC]
Please try using this CVS snapshot:
For Windows (zip):

For Windows (installer):

And use the PDO ODBC instead, it has been reported to work much better.
 [2007-08-01 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 14:01:34 2024 UTC