1
我想在代碼點火器中做一個「搜索者」,我是新的。我知道我可以這樣做:搜索db代碼點火器字符串包含
$query= $this->db->get_where('products', array('producto_nombre' => 'Arenal');
爲了得到確切的巧合。我可以做什麼,如果我想得到我的查詢每個部分巧合,我的意思是,我想獲得產品「阿雷納爾」,還有產品「阿雷納爾聲音」等等。
我想在代碼點火器中做一個「搜索者」,我是新的。我知道我可以這樣做:搜索db代碼點火器字符串包含
$query= $this->db->get_where('products', array('producto_nombre' => 'Arenal');
爲了得到確切的巧合。我可以做什麼,如果我想得到我的查詢每個部分巧合,我的意思是,我想獲得產品「阿雷納爾」,還有產品「阿雷納爾聲音」等等。
嘗試LIKE
代替WHERE
$this->db->like('producto_nombre', 'Arenal', 'both');
$query = $this->db->get('products');
太感謝你了,這也正是我一直在尋找! – delinage