Home > Database > Mysql Tutorial > body text

dreamweaver-Dreamweaver中应用mysql语句遇到的问题

WBOY
Release: 2016-06-06 09:41:45
Original
2208 people have browsed it

mysqldreamweaver

我在Dreamweaver中新建一个php文件saveaddleibie.php。代码如下:
include("conn/conn.php");
mysql_query("insert into tb_type(id,typename) values ('3','机械')",$conn);
?>
当然conn文件夹下的conn.php文件也写好。用DW打开saveaddleibie.php,按F12运行后,应该向数据库的tb_type表中插入数据。但结果令人无解,只插入成功'id'列的3,
'typename'列的'机械'没插入成功。具体看命令行的查询。如下图:
图片说明
但我在命令行中输入语句insert into tb_type(id,typename) values ('3','机械')后,
两列都能正常插入。请各位大神,我该怎么办才能在用DW的方式正常插入两列数据呢?

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