PHP代码:<?php $con=mysql_connect("localhost","root","root");if(!$con){die('Couldnotconnect:'.mysql_error());}echo"数据库连接成功!
";$db_selected=mysql_select_db("wdy46...
PHP代码:
$con = mysql_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
echo "数据库连接成功!
";
$db_selected = mysql_select_db("wdy463618", $con);
if (!$db_selected)
{
die ("数据表载入失败!" );
}
echo "数据表载入成功!";
$result = mysql_query("SELECT d_id FROM mac_vod");
while($row = mysql_fetch_array($result))
{
echo $row['FirstName'] . " " . $row['LastName'];
echo "
";
}
mysql_close($con);
?>
执行以后浏览器出现了滚动条
输出了以下源码:
数据库连接成功!
数据表载入成功!
........
求问题出在哪里
展开