|
Posted by Skeleton Man on 01/03/07 04:34
Hi,
I'm attempting to fetch all the data from an MS Access database, but every
time I try with any query it only returns every second row..
I could rows numbered from 1 to 4000 and it would return exactly 2000 rows..
I would get rows 2, 4, 6, 8, 10 ,etc..
This is the code I am using:
$dsn = "DRIVER=Microsoft Access Driver (*.mdb); DBQ=c:\\mdb\\data.mdb;";
$myDB = odbc_connect($dsn,'Admin','') or die (odbc_error());
$query = 'SELECT * FROM Hist_data';
$result = odbc_exec($myDB, $query);
$output = array();
while (odbc_fetch_row($result)){
$output[] = odbc_fetch_array($result);
}
print "Results of your query:\n\n";
print_r($output);
I tried firing up MS access and running exactly the same query, but that
functions normally and returns all the rows, so I'm assuming this is a PHP
bug..
Chris
Navigation:
[Reply to this message]
|