选择DB列是否为空


Selecting if the DB column is empty

我有一个数据库,它有一列是空的,并且不使用NULL

如果下面的列为空,我该如何选择?

$this->db->where("{$this->_table['shop_shipping_rules']}.shop_shipping_rule_name");

代码:

$this->db->or_where("{$this->_table['shop_shipping_rules']}.shop_shipping_rule_country_iso", NULL);
$this->db->or_where("{$this->_table['shop_shipping_rules']}.shop_shipping_rule_country_iso", $country_iso);
$this->db->or_where("{$this->_table['shop_shipping_rules']}.shop_shipping_rule_region_code", $shop_shipping_rule_region_code);
$this->db->where("{$this->_table['shop_shipping_rules']}.shop_shipping_rule_name");

试试这个

$this->db->where("{$this->_table['shop_shipping_rules']}.shop_shipping_rule_name",'');

在Yii和Zend为我工作。。