Answers for "codeigniter select query"

0

codeigniter where_not_in

$names = array('Frank', 'Todd', 'James');
$this->db->where_not_in('username', $names);
// Produces: WHERE username NOT IN ('Frank', 'Todd', 'James')
Posted by: Guest on October-28-2020
0

cideigniter orLike()

$this->db->like('title', 'match'); $this->db->or_like('body', $match);
// WHERE `title` LIKE '%match%' ESCAPE '!' OR  `body` LIKE '%match%' ESCAPE '!'
Posted by: Guest on October-20-2020
0

Codeigniter select where

$array = array('name' => $name, 'title' => $title, 'status' => $status);
$this->db->where($array);
// Produces: WHERE name = 'Joe' AND title = 'boss' AND status = 'active'
Posted by: Guest on August-04-2021
-1

codeigniter 4 query builder select

$builder->select('title, content, date');
$query = $builder->get();

// Executes: SELECT title, content, date FROM mytable
Posted by: Guest on December-16-2020

Browse Popular Code Answers by Language