Welcome Guest, Not a member yet? Register   Sign In
Active Record Class
#2

[eluser]Unknown[/eluser]
example1:

Code:
$this->db->where_exp('advert.obj_type =', 3, true, '1');
$this->db->or_where_exp('advert.obj_type IS NULL', null, true, '1');

Code:
WHERE ( `fr_advert`.`obj_type` = 3 OR `fr_advert`.`obj_type` IS NULL )

example2:

Code:
$this->db->where_exp('advert.obj_type =', 3, true, '1');
$this->db->or_where_exp('advert.obj_type IS NULL', null, true, '1');
$this->db->where_exp('advert.balans >', 0, true, '2');
$this->db->or_where_exp('advert.balans IS NULL', null, true, '2');

Code:
( `fr_advert`.`obj_type` = 3 OR `fr_advert`.`obj_type` IS NULL ) AND ( `fr_advert`.`balans` > 0 OR `fr_advert`.`balans` IS NULL )


Messages In This Thread
Active Record Class - by El Forum - 08-09-2012, 07:50 AM
Active Record Class - by El Forum - 08-09-2012, 08:20 AM
Active Record Class - by El Forum - 08-09-2012, 10:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB