From 0336fe6298724eb2686c8e65ee8729b0701382d1 Mon Sep 17 00:00:00 2001 From: jekkos Date: Sun, 16 Aug 2015 15:52:25 +0200 Subject: [PATCH] Stop showing duplicate suggestions for company_name --- application/models/item.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/models/item.php b/application/models/item.php index 3bf9048b3..8de98d0d4 100644 --- a/application/models/item.php +++ b/application/models/item.php @@ -257,7 +257,9 @@ class Item extends CI_Model $by_company_name = $this->db->get(); foreach($by_company_name->result() as $row) { - $suggestions[]=$row->company_name; + if (!in_array($row->company_name, $suggestions)) { + $suggestions[]=$row->company_name; + } } /** GARRISON ADDED 4/21/2013 **/