Hi all,
I try to get data from Access database,but I could not get it,can you please help me!
This is my code to get data from back end Access database.I have used DSN "student"
table name is "stu".
<body>
<?
@ $db=odbc_pconnect("localhost","student","student");
if(!$db)
{
echo "Error:could not connect to database.please try again later";
exit;
}
odbc_prepare("c:\leela\db1.mdb");
$query = "select * from stu";
$result =odbc_result($query);
$num_results = odbc_num_rows($result);
echo "<p> number of books found: ".$num_results."</p>";
?>
</body>
Thanks inadvance,
Leela