Home >Backend Development >PHP Tutorial >织梦怎么写sql插入

织梦怎么写sql插入

WBOY
WBOYOriginal
2016-06-23 13:57:15948browse

 {dede:php}    $sql = "INSERT INTO dede_diyform1(lianxiwomen,xingming,age) VALUES ("11","11","11")";    $dsql->ExecuteNoneQuery($sql); //执行这个插入语句    {/dede:php}


这个我网上找的代码没插入哈          sql语句是对的


回复讨论(解决方案)

你确定sql语句是对的?
都是双引号又没转义
$sql = "INSERT INTO dede_diyform1(lianxiwomen,xingming,age) VALUES (\"11\",\"11\",\"11\")";
这样才对

哈哈 对了

你确定sql语句是对的?
都是双引号又没转义
$sql = "INSERT INTO dede_diyform1(lianxiwomen,xingming,age) VALUES (\"11\",\"11\",\"11\")";
这样才对

每访问一次就插入一条记录
这样做有意义吗?

Statement:
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