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=Microso ft Access Driver (*.mdb); DBQ=c:\\mdb\\da ta.mdb;";
$myDB = odbc_connect($d sn,'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_arra y($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
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=Microso ft Access Driver (*.mdb); DBQ=c:\\mdb\\da ta.mdb;";
$myDB = odbc_connect($d sn,'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_arra y($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
Comment