如何从数据库字段mysqli中选择特定密钥?

时间:2018-01-30 11:13:12

标签: mysqli

how to get value 6 existed in year_id 6  and make_id=1

SELECT *
FROM manage_model
WHERE year_id IN(6)
AND make_id=1

我试过这段代码。它不起作用。

1 个答案:

答案 0 :(得分:0)

尝试:

SELECT * FROM manage_model where CONCAT(',',year_id,',') like '%,6,%' AND make_id=1