Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function get_options($query)
- {
- $data = array();
- $this->db->select(array('cities.insee_code', 'cities.name', 'cities.department_code'))
- ->from($this->table)
- ->like('cities.name', $query)
- ->order_by('name', 'asc')
- ->limit(100, 0);
- foreach ($this->db->get()->result() as $row) {
- $data[] = [
- 'id' => $row->insee_code,
- 'text' => $row->name.' ('.$row->department_code.')'
- ];
- }
- return $data;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement