register starts is now possible in the new materialize version

This commit is contained in:
marko
2023-01-15 18:45:33 +01:00
parent 6d5d7e7142
commit 90d84283e8
13 changed files with 1201 additions and 461 deletions

View File

@@ -45,6 +45,7 @@ class dbConnector
/// als UTF8 in latin1(?) gespeichert.
/// @toDo: Die Standardwerte sollten vielleicht aus einer config
/// kommen, nicht hardcoded
try {
$pdoStatement = self::$db->prepare($aQueryString);
foreach ($aBindArray as $bindName => $bind) {
@@ -92,6 +93,12 @@ class dbConnector
return $ret;
}
// @todo docu
public static function getLastInsertId()
{
return self::$db->lastInsertId();
}
// get a Connection to the database
private static function connectToPdo($hostname, $dbName, $user, $password)
{
@@ -120,4 +127,19 @@ class dbConnector
self::$db = null;
}
}
public static function debugEchoQuery($query, $params)
{
foreach ($params as $key => $value) {
switch($value['data_type']) {
case PDO::PARAM_STR:{
$query = str_replace($key, '\'' . $value['value'] . '\'', $query);
}
default:{
$query = str_replace($key, $value['value'], $query);
}
}
};
echo('query: ' . $query . PHP_EOL);
}
}