为什么这个 mysql 查询 return 不正确的行
Why does this mysql query return incorrect rows
我正在尝试 运行 以下内容:
SELECT *
from `picks`
where `name` = 'test' and `a1` = '1' and `a2` = '2'
and `a3` = '3' and `a4` = '4' and `a5` = '5' and `a6` = '6' and `a7` = '7'
and `a8` = '8' and `a9` = '9' and `a10` = '10'
但由于某些原因,returns 行不正确,在下面的示例中,第 a3
列是 errr
,但我的查询显示:
and `a3` = '3'
注意:查询数据不是数字而是我主数据中的实际文本
第一列名称错误你有 title
但你正在寻找 name
我不确定您是否需要“=”运算符,请在尝试匹配字符串时尝试使用 LIKE
类似于:
SELECT * from `picks` where `title` LIKE 'title' AND `int_value_container`='1' AND `mixed_values` LIKE 'value123'
我正在尝试 运行 以下内容:
SELECT *
from `picks`
where `name` = 'test' and `a1` = '1' and `a2` = '2'
and `a3` = '3' and `a4` = '4' and `a5` = '5' and `a6` = '6' and `a7` = '7'
and `a8` = '8' and `a9` = '9' and `a10` = '10'
但由于某些原因,returns 行不正确,在下面的示例中,第 a3
列是 errr
,但我的查询显示:
and `a3` = '3'
注意:查询数据不是数字而是我主数据中的实际文本
第一列名称错误你有 title
但你正在寻找 name
我不确定您是否需要“=”运算符,请在尝试匹配字符串时尝试使用 LIKE
类似于:
SELECT * from `picks` where `title` LIKE 'title' AND `int_value_container`='1' AND `mixed_values` LIKE 'value123'