mysql - php连接数据库查询语句中含&

WBOY
Release: 2016-06-06 20:37:38
Original
1104 people have browsed it

在php里面用mysql_query("INSERT INTO article(title, content, author_id, time) values( '$title', '$content', $id, '$time')"'),但是$content里面有&符号,后面的内容就插不进去了,应该怎么改?

回复内容:

在php里面用mysql_query("INSERT INTO article(title, content, author_id, time) values( '$title', '$content', $id, '$time')"'),但是$content里面有&符号,后面的内容就插不进去了,应该怎么改?

我试了下&是可以做为内容直接插入的,看看你的长度是否够
mysql - php连接数据库查询语句中含&

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