_getAutocompleteSelect(); $select->where('`dbaName` LIKE ? OR `businessName` LIKE ?', '%' . $term . '%'); return $this->_db->fetchAll($select); } public static function getAutocompleteColumns() { return [ 'value' => 'id', 'title' => Model::getAutocopleteNameDbExpr(), ]; } public static function getAutocompleteItemTitle($vendorId) { $columns = self::getAutocompleteColumns(); unset($columns['value']); $select = Qs_Db::getSelect(); $select->from(Qs_Db::getPair('Vendor'), $columns); $select->where('id = ?', $vendorId, Qs_Db::INT_TYPE); $select->limit(1); return Qs_Db::getInstance()->fetchOne($select); } public static function getAutocompleteItemTitles($vendorIds) { $columns = self::getAutocompleteColumns(); $select = Qs_Db::getSelect(); $select->from(Qs_Db::getPair('Vendor'), $columns); $select->where('id IN (?)', $vendorIds); return Qs_Db::getInstance()->fetchPairs($select); } }