连接不成功,你试用如下的Code判断不成功的原因:
<html>
<body>
<?
$link=mysql_connect("localhost","root","999999")
if(!$link);
{
print("connect database error!");
}
?>
</body>
</html>
这样,会报出错误信息,
<html>
<body>
<?
$link=mysql_connect("localhost","root","999999")
if(!$link);
{
print("connect database error!");
}
?>
</body>
</html>
这样,会报出错误信息,
解决方案 »
- 求一条SQL语句,查询表字段名,字段类型,字段长度,字段精度和字段注释
- 请问这样的问题的MySql查询语句怎么写?
- 连接池连接数据库报Communications link failure错误
- postgres agent问题
- mysql 的字符集是latin1,但还是可以存储中文,而且不会乱码?实在不知道其中的原由..有高手可以解答一下吗?
- 关于postgresql........relation "A" does not exist的问题.....
- mysql如何实现嵌套查询
- 有那位高手知道如何在EMS中导入文本文件中的数据,及死了!!
- products_descriptin 数据表中查找products_name中含关键词android的产品
- 分库分表——已有表如何分?
- postgresql 支持中文的全文索引吗?
- 如何让我安装在linux上得mysql(version:4.1.14)数据库支持中文?
应该是这样
<html>
<body>
<?
$link=mysql_connect("localhost","root","999999");
if(!$link)
{
print("connect database error!");
}
else
{
print("ok!");
}
?>
</body>
</html>
解决