From 33f08b0c8ee95750689e11715db315ffb3f8bbd7 Mon Sep 17 00:00:00 2001 From: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com> Date: Wed, 14 Dec 2022 23:25:06 +0100 Subject: [PATCH] Fix Client name look up Use CONCAT_WS instead CONCAT add white space infront of Firstname --- .gitignore | 1 + src/modules/Client/Service.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d40e997ae..777611e23 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,5 @@ npm-debug.log src/.php-cs-fixer.cache .vscode +.nova .php-cs-fixer.cache diff --git a/src/modules/Client/Service.php b/src/modules/Client/Service.php index 1dce749e4..0baf9f648 100644 --- a/src/modules/Client/Service.php +++ b/src/modules/Client/Service.php @@ -211,7 +211,7 @@ class Service implements InjectionAwareInterface public function getPairs($data) { $limit = $this->di['array_get']($data, 'per_page', 30); - [$sql, $params] = $this->getSearchQuery($data, "SELECT c.id, CONCAT(c.first_name, ' ', c.last_name) as full_name"); + [$sql, $params] = $this->getSearchQuery($data, "SELECT c.id, CONCAT_WS('', c.first_name, ' ', c.last_name) as full_name"); $sql = $sql . ' LIMIT ' . $limit; return $this->di['db']->getAssoc($sql, $params);