#38310 [NEW]: odbc_fetch_row(): 8 is not a valid ODBC result resource
| From: | suneelpro at rediffmail dot com | Date: | Thu, 03 Aug 2006 10:05:17 +0000 |
| Subject: | #38310 [NEW]: odbc_fetch_row(): 8 is not a valid ODBC result resource | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-100268@lists.php.net to get a copy of this message | ||
From: suneelpro at rediffmail dot com
Operating system: windows
PHP version: 5.1.4
PHP Bug Type: ODBC related
Bug description: odbc_fetch_row(): 8 is not a valid ODBC result resource
Description:
------------
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);
odbc_execute($result);
odbc_result_all($result,"border=1");
odbc_free_result($result);
while (odbc_fetch_row($result)) {
for ($y = 1; $y <= odbc_num_fields($result); $y++) {
$arr[$x][$y] = odbc_result($result,$y);
$x++;
}
if ($x > 1)
return $arr;
}
$arr=$result;
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
--
Edit bug report at http://bugs.php.net/?id=38310&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38310&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38310&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38310&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38310&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38310&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38310&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38310&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38310&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38310&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38310&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38310&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38310&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38310&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38310&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38310&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38310&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38310&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38310&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38310&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38310&r=mysqlcfg