0
我使用codeigniter(php)并在数据库中有一个表我想要选择查询相等的单词不管它看起来是什么样子。php查询等于图
比如我在数据库的MySQL如下表:
我希望得到的是具有主动column.what的NUM 2
我该怎么排?
+----------------------------------------+
| Name Active Insert_Time |
+----------------------------------------+
| mon 2222 1481203712 |
| tue 2 1481202788 |
| wed 222 1481202581 |
| thu 22 1479902588 |
+----------------------------------------+
我已经试过这样:
$search_term = $this->input->post('search');
$this->db->select('Active, Name', FALSE);
$this->db->where('Active LIKE', '%'.$search_term_num.'%');
$query = $this->db->get('submit_house');
此查询给我的所有行,但我只是排2
为什么你不能说'活动= 2'? – Rahul