使用mysql查询将逗号分隔两个字段进行比较 [英] Comma separated two fields compare using mysql query

查看:93
本文介绍了使用mysql查询将逗号分隔两个字段进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everyone,



我想比较mysql查询中的两个逗号分隔值。这里,t1.comma和t2.chk两个字段都包含逗号分隔值。



我在下面给出了代码,但是我得到了错误。

 选择 * 来自 tmp1  as  t1,tmp2  as  t2  where  MATCH(t2.chk)反对(t1.comma  IN  BOOLEAN MODE)



错误信息:

# 1210 - AGAINST的参数不正确 - 这个错误显示在mysql中



所以,任何人都可以帮助我...



提前谢谢

解决方案

请检查以下链接:



php - 用于比较两个逗号分隔值的Mysql查询 - Stack Overflow [ ^ ]





php - 比较mysql中的两个逗号分隔值 - Stack Overflow [ ^ ]





如何使用MySQL比较两个以逗号分隔的字符串列表 - Stack Overflow [ ^ ]

Hello Everyone,

I want to compare two comma separated values in mysql query. Here, t1.comma and t2.chk both fields contain comma separated values.

I have tried below given code for this but I get Error for it.

select * from tmp1 as t1, tmp2 as t2 where MATCH (t2.chk) AGAINST (t1.comma IN BOOLEAN MODE)


Error message:
#1210 - Incorrect arguments to AGAINST - This error displays in mysql

So, can anybody help me ...

Thank you in advance

解决方案

Please check these links:

php - Mysql query for comparing two comma seperated values - Stack Overflow[^]


php - compare two comma separated values in mysql - Stack Overflow[^]


How to compare two comma-separated string lists using MySQL - Stack Overflow[^]


这篇关于使用mysql查询将逗号分隔两个字段进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆