PHP and SQL Server link _php tutorial

Source: Internet
Author: User
PHP and SQL Server links

$conn = Dbo.mssql_connect ("61.164.111.245", "Yon", "123456");
$dbname = @mssql_select_db ("Yong1", $conn);? >
This section of the link code is also a hint error mssql_query (): 3 is not a valid MS Sql-link resource in f:yongjiayjadminconn.php on line 3
The database can be connected successfully
The data can also be displayed as updates.
I have not had problems with this generation in the generation of the native test
Copy php content to clipboard PHP code:
$action =$_post["Action"];
if ($action = = "Commit") {
$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);//here is 107 rows
if ($query) {
echo "";
Mssql_close ();
}
}
?>


But when it was running on the server, there was a
Warning:mssql_query (): 3 is not a valid MS Sql-link resource in f:yongjiayjadmindianziup.php on line 107

[ ]

I'll answer that.




d8888d Huitie Content-------------------------------------------------------
does not use the DBO class, however, the source of the problem must be not connected to the database, after the connection, if the connection fails, the error is displayed, and then find the reason

d8888d Huitie Content-------------------------------------------------------
Mixed Mssql_query (string query [, resource link_identifier [, int batch_size]])

The link to the database is out of the question. The current link is not a valid link.

d8888d Huitie Content-------------------------------------------------------
You said you didn't say. And I know there's been a mistake.
How did it work out?

d8888d Huitie Content-------------------------------------------------------
Linux server? Need to install FreeTDS check the relevant information.


http://www.bkjia.com/PHPjc/632559.html www.bkjia.com true http://www.bkjia.com/PHPjc/632559.html techarticle PHP with SQL Server link $conn = Dbo.mssql_connect ("61.164.111.245", "Yon", "123456"), $dbname = @mssql_select_db ("Yong1", $ conn);? > This section of the link code is also a hint error mssql_query (): ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.