0

Hi
With the following script

<html>
<body>
<?php
$server = "localhost";
$username= "root";
$password ="mysql";
$connect_mysql=mysql_connect($server,$username,$password);
if($connect_mysql)
{
echo "Connection Established";
$mysql_db=mysql_select_db("mysql");
if($mysql_db)
echo "<Br><Br>Connected to database <BR><BR>";
echo  "<Table>";
echo "<TR><TH>Employee_ID</TH><TH>Employee_Name</TH></TR>";
echo "<DBQUERY q>select  emp_id,emp_name from employee";
echo "<DBROW><TR><TD><? q.emp_id></TD><TD><? q.emp_name></TD></TR> ";
 
echo "</DBQUERY>";
echo "</TR>";
echo "</Table>";
}
?>
</body>
</html>

The output is unexpectedly getten as the following
Connection Established

Connected to database

Employee_ID Employee_Name
select emp_id,emp_name from employee
Please can anyone help me thankfully.

2
Contributors
1
Reply
3
Views
6 Years
Discussion Span
Last Post by IIM
0

who told you this way to write query.....
Look into this to learn how to write sql queries in PHP.....Click Here

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.