diff --git a/www/admin/class_test.db.php b/www/admin/class_test.db.php index adb6e8b9..bff2aeeb 100644 --- a/www/admin/class_test.db.php +++ b/www/admin/class_test.db.php @@ -38,7 +38,9 @@ print ""; print "
" . print_r($db->dbGetReturningExt(), true) . "|
" . print_r($db->dbGetReturningArray(), true) . "|
" . print_r($db->dbGetReturningExt(), true) . "|
" . print_r($db->dbGetReturningArray(), true) . "|
" . print_r($res, true) . "
" . print_r($res, true) . "
" . print_r($res) . ""; +var_dump($res); +print "Field Name/Types:
" . print_r($db->dbGetFieldNameTypes(), true) . ""; +echo "
" . print_r(pg_version($dbh), true) . "
" . print_r($db->dbGetReturningExt(), true) . "|
" . print_r($db->dbGetReturningArray(), true) . "|
" + . "ERROR: " . $db->dbGetLastError(true) . "
"; +echo "
"; + +$query_select = <<dbReturnRowParams($query_select, [$uniqid]); +// auto switch: +// ^int +// bool +// with flags: +// json(b) => array +// bytes => string? or resource? +// numeric => float (can have precision cut) +$pos = 0; +$name = ''; +if (is_array($res)) { + $cursor = $db->dbGetCursor(); + var_dump($res); + print "Field Name/Types: " . print_r($db->dbGetFieldNameTypes(), true) . ""; + print "Get type for: 'number_a':" . $db->dbGetFieldType('number_a') . "
"; + print "Get type for: 0: " . $db->dbGetFieldType(0) . "
"; + print "Get name for: 0: " . $db->dbGetFieldName(0) . "
"; +} + +$db->dbSetConvertFlag(Convert::on); +$db->dbSetConvertFlag(Convert::json); +$db->dbSetConvertFlag(Convert::numeric); +$db->dbSetConvertFlag(Convert::bytea); +$res = $db->dbReturnRowParams($query_select, [$uniqid]); +if (is_array($res)) { + var_dump($res); +} + +print ""; + +// __END__ diff --git a/www/admin/class_test.php b/www/admin/class_test.php index 8f0e58aa..91e61713 100644 --- a/www/admin/class_test.php +++ b/www/admin/class_test.php @@ -69,6 +69,7 @@ print ""; // key: file name, value; name $test_files = [ 'class_test.db.php' => 'Class Test: DB', + 'class_test.db.types.php' => 'Class Test: DB COLUMN TYPES', 'class_test.db.single.php' => 'Class Test: DB SINGLE', 'class_test.db.dbReturn.php' => 'Class Test: DB dbReturn', 'class_test.convert.colors.php' => 'Class Test: CONVERT COLORS',