From 59a95f7c01813382f7611101e5b924edddfb814b Mon Sep 17 00:00:00 2001 From: Stanislas Dolcini Date: Fri, 5 Oct 2018 19:47:21 +0200 Subject: [PATCH] Fix string. --- code/web/public_php/login/class/ConnectionHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/web/public_php/login/class/ConnectionHandler.php b/code/web/public_php/login/class/ConnectionHandler.php index 6a29fbb2a..2b14e21a8 100644 --- a/code/web/public_php/login/class/ConnectionHandler.php +++ b/code/web/public_php/login/class/ConnectionHandler.php @@ -149,10 +149,10 @@ class ConnectionHandler setMsgLanguage($lang); $domainName = $mysqli->escape_string($clientApplication); - if ($stmt = $mysqli->prepare("SELECT TOP 1 domain_id FROM domain WHERE domain_name='?'")) { + if ($stmt = $mysqli->prepare('SELECT domain_id FROM domain WHERE domain_name=\'?\' LIMIT 1')) { $stmt->bind_param("s", $domainName); $stmt->execute(); - $stmt->bind_result($result) or die(errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysqli_error($link))); + $stmt->bind_result($result) or die(errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, $db_Connection->error)); $stmt->fetch(); if ($stmt->num_rows == 0) { // unrecoverable error, we must giveup