带有转义撇号的Mysql内连接结果为零

时间:2016-01-28 03:34:37

标签: mysql join apostrophe

Myquery:

SELECT *
FROM sj t1
INNER JOIN price_list t2 ON replace(replace(t2.product_name,'"',''),"'","") = replace(replace(t1.item,'"',''),"'","")
INNER JOIN convert_list t3 ON replace(replace(t3.product_name,'"',''),"'","") = replace(replace(t1.item,'"',''),"'","")
WHERE t2.id_file = '861'
    AND t1.id BETWEEN 2342 AND 2426
order by t1.id asc
LIMIT 0 , 300

结果为零。

数据库:

Sample sj item / price_list.product_name / convert_list.product_name : 

zero\'s
one\'s
second\"s
third\'s

感谢您的帮助。

0 个答案:

没有答案