mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
MS SQL: Prefix Unicode strings with 'N' so they are treated correctly
This commit is contained in:
@@ -40,7 +40,8 @@ if (isset($_GET["mssql"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function quote($string) {
|
function quote($string) {
|
||||||
return "'" . str_replace("'", "''", $string) . "'";
|
$unicode = strlen($string) != strlen(utf8_decode($string));
|
||||||
|
return ($unicode ? "N" : "") . "'" . str_replace("'", "''", $string) . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
function select_db($database) {
|
function select_db($database) {
|
||||||
@@ -163,7 +164,8 @@ if (isset($_GET["mssql"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function quote($string) {
|
function quote($string) {
|
||||||
return "'" . str_replace("'", "''", $string) . "'";
|
$unicode = strlen($string) != strlen(utf8_decode($string));
|
||||||
|
return ($unicode ? "N" : "") . "'" . str_replace("'", "''", $string) . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
function select_db($database) {
|
function select_db($database) {
|
||||||
|
Reference in New Issue
Block a user