Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
caf03421a7 | ||
|
|
facf8adaf7 | ||
|
|
c8158c8224 |
@@ -467,7 +467,6 @@ final class CoreLibsCombinedDateTimeTest extends TestCase
|
|||||||
\CoreLibs\Combined\DateTime::intervalStringFormat($seconds);
|
\CoreLibs\Combined\DateTime::intervalStringFormat($seconds);
|
||||||
} else {
|
} else {
|
||||||
if (in_array('show_only_days', $params)) {
|
if (in_array('show_only_days', $params)) {
|
||||||
echo "FOO\n";
|
|
||||||
\CoreLibs\Combined\DateTime::intervalStringFormat($seconds, show_only_days:true);
|
\CoreLibs\Combined\DateTime::intervalStringFormat($seconds, show_only_days:true);
|
||||||
} elseif (in_array('truncate_after', $params)) {
|
} elseif (in_array('truncate_after', $params)) {
|
||||||
\CoreLibs\Combined\DateTime::intervalStringFormat($seconds, truncate_after: 'v');
|
\CoreLibs\Combined\DateTime::intervalStringFormat($seconds, truncate_after: 'v');
|
||||||
|
|||||||
@@ -56,7 +56,9 @@ print "<b>dbReturn CACHE tests</b><br>";
|
|||||||
$db->dbExec("DELETE FROM test_db_return");
|
$db->dbExec("DELETE FROM test_db_return");
|
||||||
$db->dbExec("INSERT INTO test_db_return (uid, data) VALUES ('A1', 'Test A'), ('B1', 'Test B')");
|
$db->dbExec("INSERT INTO test_db_return (uid, data) VALUES ('A1', 'Test A'), ('B1', 'Test B')");
|
||||||
// read query to use
|
// read query to use
|
||||||
$q_db_ret = "SELECT * FROM test_db_return ORDER BY uid";
|
$q_db_ret = <<<SQL
|
||||||
|
SELECT * FROM test_db_return ORDER BY uid
|
||||||
|
SQL;
|
||||||
|
|
||||||
RunningTime::hrRunningTime();
|
RunningTime::hrRunningTime();
|
||||||
|
|
||||||
@@ -157,4 +159,15 @@ $db->dbCacheReset($q_db_ret);
|
|||||||
print "<br>";
|
print "<br>";
|
||||||
print "Overall Run time: " . RunningTime::hrRunningTimeFromStart() . "<br>";
|
print "Overall Run time: " . RunningTime::hrRunningTimeFromStart() . "<br>";
|
||||||
|
|
||||||
|
print "<br>";
|
||||||
|
print "PARAM TEST RUN<br>";
|
||||||
|
// PARAM
|
||||||
|
$q_db_ret = <<<SQL
|
||||||
|
SELECT * FROM test_db_return WHERE uid = $1
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
while (is_array($res = $db->dbReturnParams($q_db_ret, ['A1'], $db::NO_CACHE, true))) {
|
||||||
|
print "ROW: " . Support::printAr($res) . "<br>";
|
||||||
|
}
|
||||||
|
|
||||||
// __END__
|
// __END__
|
||||||
|
|||||||
@@ -1186,7 +1186,7 @@ class IO
|
|||||||
*/
|
*/
|
||||||
private function __dbDebugPrepareContext(string $query, array $params = []): array
|
private function __dbDebugPrepareContext(string $query, array $params = []): array
|
||||||
{
|
{
|
||||||
if ($this->params === []) {
|
if ($params === []) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
$error_data = [
|
$error_data = [
|
||||||
@@ -2411,6 +2411,8 @@ class IO
|
|||||||
|
|
||||||
// set the query
|
// set the query
|
||||||
$this->cursor_ext[$query_hash]['query'] = $query;
|
$this->cursor_ext[$query_hash]['query'] = $query;
|
||||||
|
// set the query parameters
|
||||||
|
$this->cursor_ext[$query_hash]['params'] = $params;
|
||||||
// before doing ANYTHING check if query is "SELECT ..." everything else does not work
|
// before doing ANYTHING check if query is "SELECT ..." everything else does not work
|
||||||
if (!$this->dbCheckQueryForSelect($this->cursor_ext[$query_hash]['query'])) {
|
if (!$this->dbCheckQueryForSelect($this->cursor_ext[$query_hash]['query'])) {
|
||||||
$this->__dbError(17, false, context: [
|
$this->__dbError(17, false, context: [
|
||||||
@@ -2420,8 +2422,6 @@ class IO
|
|||||||
]);
|
]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// set the query parameters
|
|
||||||
$this->cursor_ext[$query_hash]['params'] = $params;
|
|
||||||
// QUERY PARAMS: run query params check and rewrite
|
// QUERY PARAMS: run query params check and rewrite
|
||||||
if ($this->dbGetConvertPlaceholder() === true) {
|
if ($this->dbGetConvertPlaceholder() === true) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user