A php update problem. One php update question $ conndbo. mssql_connect (61.164.111.245, yon, 123456); $ dbnamemssql_select_db (yong1, $ conn) ordie (the database does not exist or is unavailable );? I have a php update problem with this generation
$ Conn = dbo. mssql_connect ("61.164.111.245", "yon", "123456 ");
$ Dbname = mssql_select_db ("yong1", $ conn) or die ("The database does not exist or is unavailable ");
?>
I have not encountered any problems in the local testing of this generation.
$ Action = $ _ POST ["action"];
If ($ action = "submit "){
$ 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); // The value is 107 rows.
If ($ query ){
Echo "";
Mssql_close ();
}
}
?>
However, when the server is running
Warning: mssql_query (): 3 is not a valid ms SQL-Link resource in F: yongjiayjadmindianziup. php on line 107
[]
Best answer [url = http://www.111cn.cn/bbs/space.php? Username = e] link Mark e [/url]
[Url = http://www.111cn.cn/bbs/space.php? Uid = 58710] link tag [img] http://www.111cn.cn/server/avatar.php? Uid = 58710 & size = small [/img] [/url] the SQL server is not started or the SQL id is incorrect. The reason is that the local machine has the SQL SERVER service, but the space does not exist, or you have a default link on your local machine, instead of mssql_connect.
[]
D8888D reply content -------------------------------------------------------
SQL server is not started or has an SQL id error because you have the SQL SERVER service on the local machine, but there is no space, or you have a default link on the local machine without the need for mssql_connect to establish a link, no space
[]
D8888D reply content -------------------------------------------------------
Where is the database connection code?
D8888D reply content -------------------------------------------------------
Is the SQL server of the database used by the server?
D8888D reply content -------------------------------------------------------
$ Exec = "update anew set title = '". $ title. "', come = '". $ come. "', exitt = '". $ exitt. "', content = '". $ content. "', uptime = '". $ uptime. "'Where id = '". $ id ,"'";
Try it like this. it is estimated that $ id is used as the link.
D8888D reply content -------------------------------------------------------
I'm dizzy. no connection is initialized.
D8888D reply content -------------------------------------------------------
The link code has been posted. let's see if I'm going crazy.
D8888D reply content -------------------------------------------------------
$ Conn = mssql_connect ("61.164.111.245", "yon", "123456 ");
$ Dbname = mssql_select_db ("yong1", $ conn) or die ("The database does not exist or is unavailable ");
Echo $ conn;
// If not, contact the ISP and ask him to enable MSSQL extension for you. DBO is useless.
?>
D8888D reply content -------------------------------------------------------
Enable MSSQL extension
Why?
The server is managed by myself
If someone else manages them, I call them to get them done.
Required $ conn = dbo. mssql_connect ("61.164.111.245", "yon", "123456"); $ dbname = mssql_select_db ("yong1", $ conn) or die ("The database does not exist or is unavailable");?> My generation is in...