我試圖用CI寫一個說法,但我有寫WHERE is not = " "
如果不是「」空
我能有一個示例的問題,我至今都
$empty = array('');
$this->db->where_not_in("$this->_table['shop_shipping_rules']}.shop_shipping_rule_name", $empty);
我試圖用CI寫一個說法,但我有寫WHERE is not = " "
如果不是「」空
我能有一個示例的問題,我至今都
$empty = array('');
$this->db->where_not_in("$this->_table['shop_shipping_rules']}.shop_shipping_rule_name", $empty);
嘗試對簡單where()
$this->db->where("$this->_table['shop_shipping_rules']}.shop_shipping_rule_name !='' OR
$this->_table['shop_shipping_rules']}.shop_shipping_rule_name IS NOT NULL
");
編輯
$this->db->select('*');
$this->db->from('mytable');
$this->db->where("shop_shipping_rule_name IS NOT NULL AND shop_shipping_rule_name !=''")
$query = $this->db->get();
OR
$this->db->select('*');
$this->db->from('mytable');
$this->db->where(" TRIM(shop_shipping_rule_name) IS NOT NULL AND TRIM(shop_shipping_rule_name) !=''")
$query = $this->db->get();
嘗試這樣的事:
$this->db->where('field_name IS NOT NULL');
或者這樣說:
$this->db->where('field_name !=' , '');
它仍然通過數據通過 –
只需使用""
與where
$this->db->where("$this->_table['shop_shipping_rules']}.shop_shipping_rule_name !=", "");
它仍然給我這樣的數據'[ 「shop_shipping_rule_name」] =>字符串(0) 「」' –
@JessMcKenzie正是你需要的? –
我有一個數據庫像http://d.pr/i/wCwu,我想只帶數據行 –