I'm trying to connect and query an
access database - and it does connect,
but my query isn't working - I checked
that my field names are correct, but
it starts loading and gets to about
1/2 way through and just hangs
can anyone please help me out?
<?
$dbname = "WebDB";
$username = "chrissy";
$password = "deanna";
$connect = odbc_connect
($dbname, username, $password);
if (! $connect)
{
print "connection not made <br>";
exit();
}
$query = "select ID, name from MyTable";
$result = odbc_exec ($connect, $query);
if (! $result)
{
print "query not made <br>";
exit();
}
while (odbc_fetch_row($result))
{
$Field1 = odbc_result ($result, 1);
print "$Field1";
}
odbc_close ($connect);
?>