By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

how to get database detail through

P: 4
hi i have made a database let say estate agent which have 5 table and 10 queries
i have connected it with php using the tutorial in w3school
<html>
<body>
<?php
$conn=odbc_connect('db','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="SELECT * FROM client";
$rs=odbc_exec($conn,$sql);
if (!$rs)
{exit("Error in SQL");}
echo "<table><tr>";
echo "<th>firstname</th>";
echo "<th>lastname</th></tr>";
while (odbc_fetch_row($rs))
{
$fname=odbc_result($rs,"firstname");
$lname=odbc_result($rs,"lastname");
echo "<tr><td>$fname</td>";
echo "<td>$lname</td></tr>";
}
odbc_close($conn);
echo "</table>";
?>
</body>
</html>


the result is
firstname lastname
JOHN KAY
ALIN STEWART
MIKE RITCHIE
MARY TREGEAR
PATRICK HARRISON
RONALDO GERRAD

my problem is i dont know how to bring the table name client and when i click the table name client i can get the information of that table

do i have to write alot of code?

can anyone please give me code to bring out one table name and when i click the table name
i can get the content of the table
and to bring out one query as well

i will be grateful
Oct 1 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.