register starts is now possible in the new materialize version
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user