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




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查下相关资料吧


Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use