|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-24 15:30 UTC] jani@php.net
[2007-08-01 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 09:00:02 2025 UTC |
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