Mysql执行简单代码时出错
我提出了一个SQL请求,其中的一个函数已经运行,如下所示:Mysql执行简单代码时出错,mysql,sql,Mysql,Sql,我提出了一个SQL请求,其中的一个函数已经运行,如下所示: SELECT fnStripTags('this <html>is <b>a test</b>, nothing more</html>'); 我得到了这个错误: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for t
SELECT fnStripTags('this <html>is <b>a test</b>, nothing more</html>');
我得到了这个错误:
1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'SELECT fnStripTags(ps_product_lang.description) FROM
ps_product_lang WHERE ps_pr' at line 1
insert select
语句中没有values
关键字:
INSERT INTO ps_product_lang (description)
SELECT fnStripTags(description)
FROM ps_product_lang
WHERE ps_product_lang.id_lang = id_lang AND
ps_product_lang.id_product = id_product AND
description IS NOT NULL
尝试此操作..无需为insert STAENT设置
值
INSERT INTO ps_product_lang (description)
SELECT fnStripTags(description)
FROM ps_product_lang
WHERE ps_product_lang.id_lang = id_lang
AND ps_product_lang.id_product = id_product
And description IS NOT NULL
什么是id_lang和id_产品?
INSERT INTO ps_product_lang (description)
SELECT fnStripTags(description)
FROM ps_product_lang
WHERE ps_product_lang.id_lang = id_lang
AND ps_product_lang.id_product = id_product
And description IS NOT NULL