update query in codeigniter where in
$this->db->where_in()
ContentMiddleAd
Generates a WHERE field IN (‘item’, ‘item’) SQL query joined with AND if appropriate
$names = array('Frank', 'Todd', 'James');
ContentMiddleAd
$this->db->where_in('username', $names);
// Produces: WHERE username IN ('Frank', 'Todd', 'James')
$this->db->or_where_in()
Generates a WHERE field IN (‘item’, ‘item’) SQL query joined with OR if appropriate
$names = array('Frank', 'Todd', 'James');
$this->db->or_where_in('username', $names);
// Produces: OR username IN ('Frank', 'Todd', 'James')
ContentMiddleAd
$this->db->where_not_in()
Generates a WHERE field NOT IN (‘item’, ‘item’) SQL query joined with AND if appropriate
$names = array('Frank', 'Todd', 'James');
$this->db->where_not_in('username', $names);
// Produces: WHERE username NOT IN ('Frank', 'Todd', 'James')
$this->db->or_where_not_in()
Generates a WHERE field NOT IN (‘item’, ‘item’) SQL query joined with OR if appropriate
ContentMiddleAd
$names = array('Frank', 'Todd', 'James');
$this->db->or_where_not_in('username', $names);
// Produces: OR username NOT IN ('Frank', 'Todd', 'James')
No comments:
Post a Comment