dropdown from database |
Model:
public function getAllUnitsDropDown() { $builder = $this->db->table('units'); $query = $builder->select('unit_id, unit_name'); if ($query->countAll() > 0) { foreach ( $query->getResultArray() as $row ) { $data [$row ['unit_id']] = $row ['unit_name']; } } $query->free_result (); return $data; } result: Error Call to undefined method CodeIgniter\Database\MySQLi\Builder::getResultArray() |
Messages In This Thread |
dropdown from database - by antiserious - 12-12-2020, 03:14 PM
RE: dropdown from database - by vitnibel - 12-12-2020, 08:59 PM
RE: dropdown from database - by antiserious - 12-13-2020, 01:37 PM
|