Good day everybody,
Unfortunately my UPDATE does not save in the DB.
There is no error message or the like.
The output values are also correct, as is the SQL command. I copied the command from mysql.log and pasted it into the Navicat. Without problems.
From zzz to yyy
PHP:
if ($basedataValue != $formDaten) {
$sql = "UPDATE tab_basedata SET basedata_value = :value WHERE basedata_key = :basedatakey";
$options = array(
":basedatakey" => $tableKeyName,
":value" => $formDaten
);
$db->pdoExecute($sql, $options);
public function pdoExecute(string $query, array $options = null)
{
$rs = $this->prepare($query);
debugS($query);
if ($options !== null) {
foreach ($options as $key => &$option) {
if (isNumeric($option)) {
debugS($key."(numeric)");
debugS($option."(numeric)");
$rs->bindParam($key, $option, PDO::PARAM_INT);
} else {
debugS($key."(str)");
debugS($option."(str)");
$rs->bindParam($key, $option, PDO::PARAM_STR);
}
}
}
if (!$rs->execute()) $this->_on_error("DB-Error", "SQL Error in: " . $query . " - " . $rs->errorInfo()[2], $rs->debugDumpParams());
}
Output from my debugS()
UPDATE tab_basedata SET basedata_value = :value WHERE basedata_key = :basedatakey
:basedatakey(str)
global_adresse(str)
:value(str)
yyy(str)
I am thankful for every help
$rs->rowCount()
is 1 andexecute()
is true but nothing happend. – Nico Stark Aug 31 '20 at 08:26