Home > Backend Development > PHP Tutorial > asp.net database connection, special symbol problems that are prone to errors when connecting to php database

asp.net database connection, special symbol problems that are prone to errors when connecting to php database

WBOY
Release: 2016-07-29 08:43:40
Original
842 people have browsed it

It should be noted that table names and field names are wrapped with operators ("`" on the "~" key in the upper left corner of the keyboard). The values ​​after VALUES are enclosed in single quotes, which is said to be an anti-injection measure.

Copy the code The code is as follows:


$sql="INSERT INTO `Table name` (`Field 1`, `Field 2`) VALUES ('Value 1', 'Value 2')";
mysql_query($sql);

The above introduces the special symbol issues that are prone to errors when connecting to asp.net database and PHP database, including the content of asp.net database connection. I hope it will be helpful to friends who are interested in PHP tutorials.

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template