[英]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'
但是由於某種原因,它返回不正確的行,在下面的示例中, 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'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.