diff --git a/www/admin/class_test.array.php b/www/admin/class_test.array.php index cadf8117..85dbfc0a 100644 --- a/www/admin/class_test.array.php +++ b/www/admin/class_test.array.php @@ -115,9 +115,6 @@ print "ARRAYFLATFORKEY: " . DgS::printAr(ArrayHandler::arrayFlatForKey($test_arr */ function rec(string $pre, string $cur, array $node = []) { - if (!is_array($node)) { - $node = []; - } print "
" . ConvertPlaceholder::REGEX_LOOKUP_PLACEHOLDERS . ""; +print "Replace Named Regex:
" . ConvertPlaceholder::REGEX_REPLACE_NAMED . ""; +print "Replace Named Regex:
" . ConvertPlaceholder::REGEX_REPLACE_QUESTION_MARK . ""; +print "Replace Named Regex:
" . ConvertPlaceholder::REGEX_REPLACE_NUMBERED . ""; + +$uniqid = \CoreLibs\Create\Uids::uniqIdShort(); +// $binary_data = $db->dbEscapeBytea(file_get_contents('class_test.db.php') ?: ''); +// $binary_data = file_get_contents('class_test.db.php') ?: ''; +$binary_data = ''; +$params = [ + $uniqid, + true, + 'STRING A', + 2, + 2.5, + 1, + date('H:m:s'), + date('Y-m-d H:i:s'), + json_encode(['a' => 'string', 'b' => 1, 'c' => 1.5, 'f' => true, 'g' => ['a', 1, 1.5]]), + null, + '{"a", "b"}', + '{1,2}', + '{"(array Text A, 5, 8.8)","(array Text B, 10, 15.2)"}', + '("Text", 4, 6.3)', + $binary_data +]; + +$query = <<
" . Support::printAr(
SetVarType::setArray($db->dbGetCursorExt($q_db_ret))
@@ -89,8 +88,7 @@ for ($i = 1; $i <= 6; $i++) {
print $i . ") " . $cache_flag . ": "
. "res: " . (is_bool($res) ?
"Bool: " . Support::prBl($res) :
- (is_array($res) ?
- "Array: " . Support::prBl(is_array($res)) : '{-}')
+ "Array: Yes"
) . ", "
. "cursor_ext: " . Support::printAr(
SetVarType::setArray($db->dbGetCursorExt($q_db_ret))
@@ -108,8 +106,7 @@ for ($i = 1; $i <= 6; $i++) {
print $i . ") " . $cache_flag . ": "
. "res: " . (is_bool($res) ?
"Bool: " . Support::prBl($res) :
- (is_array($res) ?
- "Array: " . Support::prBl(is_array($res)) : '{-}')
+ "Array: Yes"
) . ", "
. "cursor_ext: " . Support::printAr(
SetVarType::setArray($db->dbGetCursorExt($q_db_ret))
@@ -127,8 +124,7 @@ for ($i = 1; $i <= 6; $i++) {
print $i . ") " . $cache_flag . ": "
. "res: " . (is_bool($res) ?
"Bool: " . Support::prBl($res) :
- (is_array($res) ?
- "Array: " . Support::prBl(is_array($res)) : '{-}')
+ "Array: Yes"
) . ", "
. "cursor_ext: " . Support::printAr(
SetVarType::setArray($db->dbGetCursorExt($q_db_ret))
@@ -146,8 +142,7 @@ for ($i = 1; $i <= 6; $i++) {
print $i . ") " . $cache_flag . ": "
. "res: " . (is_bool($res) ?
"Bool: " . Support::prBl($res) :
- (is_array($res) ?
- "Array: " . Support::prBl(is_array($res)) : '{-}')
+ "Array: Yes"
) . ", "
. "cursor_ext: " . Support::printAr(
SetVarType::setArray($db->dbGetCursorExt($q_db_ret))
diff --git a/www/admin/class_test.db.php b/www/admin/class_test.db.php
index 31afe4a7..158c0fff 100644
--- a/www/admin/class_test.db.php
+++ b/www/admin/class_test.db.php
@@ -316,7 +316,8 @@ print "EOM STRING EXEC RETURN TEST: " . print_r(
$db->dbReturnRowParams(
$query_select,
[$__last_insert_id]
- )
+ ),
+ true
) . "
";
// B
$status = $db->dbExecParams(
@@ -345,7 +346,8 @@ print "EOM STRING EXEC RETURN TEST: " . print_r(
$db->dbReturnRowParams(
$query_select,
[$__last_insert_id]
- )
+ ),
+ true
) . "
";
// params > 10 for debug
// error catcher
@@ -674,7 +676,7 @@ echo "
";
print "COMPOSITE ELEMENT READ
";
$res = $db->dbReturnRow("SELECT item, count, (item).name, (item).price, (item).supplier_id FROM on_hand");
-print "ROW: " . print_r($res) . "
";
+print "ROW: " . print_r($res, true) . "
";
var_dump($res);
print "Field Name/Types: " . print_r($db->dbGetFieldNameTypes(), true) . "
";
echo "
";
diff --git a/www/admin/class_test.php b/www/admin/class_test.php
index a5032e9a..a6355cec 100644
--- a/www/admin/class_test.php
+++ b/www/admin/class_test.php
@@ -73,6 +73,7 @@ $test_files = [
'class_test.db.query-placeholder.php' => 'Class Test: DB query placeholder convert',
'class_test.db.dbReturn.php' => 'Class Test: DB dbReturn',
'class_test.db.single.php' => 'Class Test: DB single query tests',
+ 'class_test.db.convert-placeholder.php' => 'Class Test: DB convert placeholder',
'class_test.convert.colors.php' => 'Class Test: CONVERT COLORS',
'class_test.check.colors.php' => 'Class Test: CHECK COLORS',
'class_test.mime.php' => 'Class Test: MIME',