From 897406456a7c1c32e8149bdeae0767556806ae76 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 29 Nov 2023 10:47:55 +0900 Subject: [PATCH] admin updates --- www/admin/class_test.array.php | 17 +++++++++++++++++ www/admin/class_test.db.query-placeholder.php | 2 ++ 2 files changed, 19 insertions(+) diff --git a/www/admin/class_test.array.php b/www/admin/class_test.array.php index eef96c21..cc1789b3 100644 --- a/www/admin/class_test.array.php +++ b/www/admin/class_test.array.php @@ -21,6 +21,7 @@ ob_end_flush(); use CoreLibs\Combined\ArrayHandler; use CoreLibs\Debug\Support as DgS; use CoreLibs\Convert\SetVarType; +use PHPUnit\Framework\Constraint\ArrayHasKey; $log = new CoreLibs\Logging\Logging([ 'log_folder' => BASE . LOG, @@ -236,6 +237,22 @@ $flag = false; $output = \CoreLibs\Combined\ArrayHandler::genAssocArray($db_array, $key, $value, $flag); print "OUTPUT: " . \CoreLibs\Debug\Support::printAr($output) . "
"; + +print "
"; +$array = [ + 'a' => 'First', + 'b' => 'Second', + 'c' => 'Third', +]; + +foreach (array_keys($array) as $search) { + print "Result[" . $search . "]: " + . "next: " . DgS::printAr(ArrayHandler::arrayGetNextKey($array, $search)) . ", " + . "prev: " . DgS::printAr(ArrayHandler::arrayGetPrevKey($array, $search)) + . "
"; +} +print "Key not exists: " . DgS::printAr(ArrayHandler::arrayGetNextKey($array, 'z')) . "
"; + print ""; // __END__ diff --git a/www/admin/class_test.db.query-placeholder.php b/www/admin/class_test.db.query-placeholder.php index 6da93482..da052c4e 100644 --- a/www/admin/class_test.db.query-placeholder.php +++ b/www/admin/class_test.db.query-placeholder.php @@ -115,6 +115,8 @@ echo "INSERT ALL COLUMN TYPES: " . "ERROR: " . $db->dbGetLastError(true) . "
"; echo "
"; +// test connectors: = , <> () for query detection + // convert placeholder tests // ? -> $n // :name -> $n