这段链接代码也是提示错误mssql_query():"/> 这段链接代码也是提示错误mssql_query():">
Home > php教程 > php手册 > php与sql server链接

php与sql server链接

WBOY
Release: 2016-06-13 09:53:02
Original
850 people have browsed it




php与sql server链接


$conn = dbo.mssql_connect("61.164.111.245","yon","123456");
$dbname = @mssql_select_db("yong1",$conn) ;?>
这段链接代码也是提示错误mssql_query(): 3 is not a valid MS SQL-Link resource in F:yongjiayjadminconn.php on line 3
数据库能连接成功的
数据也能显示出来就是更新时
我这代段在代在本机测试没有出现过问题的
复制PHP内容到剪贴板 PHP代码:
$action=$_POST["action"];
if ($action=="提交"){
$id=$_POST["id"];
$title=$_POST["title"];
$come=$_POST["come"];
$exitt=$_POST["exitt"];
$content=stripslashes(trim($_POST["content"]));
$uptime=$_POST["uptime"];
if($id==""){
echo "";
}
if($title==""){
echo"";
}
if($come==""){
echo"";
}
if($exitt==""){
echo"";
}
if ($content==""){
echo "";
}
if($uptime==""){
echo "";
}
$exec="update anew set title='".$title."', come='".$come."', exitt='".$exitt."', content='".$content."', uptime='".$uptime."' where id=".$id;
$query=@mssql_query($exec);// 此处为107行
if($query){
echo"";
mssql_close();
}
}
?>


但是到了服务器上运行时出现了
Warning: mssql_query(): 3 is not a valid MS SQL-Link resource in F:yongjiayjadmindianziup.php on line 107

[ ]

我来回答




D8888D回贴内容-------------------------------------------------------
没用过DBO类,不过,问题的根源肯定是没连上数据库,连接后,如果连接失败,把错误显示出来,再查找原因

D8888D回贴内容-------------------------------------------------------
mixed mssql_query ( string query [, resource link_identifier [, int batch_size]] )

数据库的链接出问题了。当前链接不是合法的链接。

D8888D回贴内容-------------------------------------------------------
你们说了等于没说.我也知道那里出错了
怎么解决了

D8888D回贴内容-------------------------------------------------------
linux服务器?需要安装freetds查下相关资料吧


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template