BASE . LOG,
'log_file_id' => $LOG_FILE_ID,
'log_per_date' => true,
]);
// db connection and attach logger
$db = new CoreLibs\DB\IO(DB_CONFIG, $log);
$db->log->debug('START', '=============================>');
$PAGE_NAME = 'TEST CLASS: DB SINGLE';
print "";
print "
" . $PAGE_NAME . "";
print "";
print '';
print '';
print '' . $PAGE_NAME . '
';
print "LOGFILE NAME: " . $db->log->getLogFile() . "
";
print "LOGFILE ID: " . $db->log->getLogFileId() . "
";
print "DBINFO: " . $db->dbInfo() . "
";
// DB client encoding
print "DB client encoding: " . $db->dbGetEncoding() . "
";
print "DB search path: " . $db->dbGetSchema() . "
";
$to_db_version = '15.2';
print "VERSION DB: " . $db->dbVersion() . "
";
print "SERVER ENCODING: " . $db->dbVersionInfo('server_encoding') . "
";
if (($dbh = $db->dbGetDbh()) instanceof \PgSql\Connection) {
print "ALL OUTPUT [TEST]: " . print_r(pg_version($dbh), true) . "
";
} else {
print "NO DB HANDLER
";
}
// params > 10 for debug
// error catcher
$query_insert = <<dbExecParams($query_insert, $query_params);
echo "*
";
echo "EOM STRING WITH MORE THAN 10 PARAMETERS: "
. Support::printToString($query_params) . " |
"
. " |
"
. "PRIMARY KEY: " . Support::printToString($db->dbGetInsertPK()) . " | "
// . "RETURNING EXT: " . Support::printToString($db->dbGetReturningExt()) . " | "
. "RETURNING RETURN: " . Support::printToString($db->dbGetReturningArray())
. "ERROR: " . $db->dbGetLastError(true) . "
";
echo "
";
print "";
// __END__