SELECT
`itemmaster`.*
FROM
`sds`.`itemmaster`
WHERE `item_stock_code` = (SELECT
`item_stock_code`
FROM
`sds`.`itemmaster`
WHERE (`item_stock_code` ='221F0009DN00H2A')) AND
`item_stock_code` = (SELECT
`item_stock_code`
FROM
`sds`.`itemmaster`
WHERE (`item_stock_code` ='221F0010DN00H2A'));
答案 0 :(得分:1)
对于Codeigniter,您可以使用:
$this->db->where_in('your_column', array('status1','status2'));
请参阅此CI参考Link:or_where_in
在SQL中:
"SELECT * from your_table Where your_column IN (".implode(',',$your_satus_array).")";