return false;
}
+ $persistent = (bool)$this->configCache->get('database', 'persistent');
+
$this->emulate_prepares = (bool)$this->configCache->get('database', 'emulate_prepares');
$this->pdo_emulate_prepares = (bool)$this->configCache->get('database', 'pdo_emulate_prepares');
}
try {
- $this->connection = @new PDO($connect, $user, $pass);
+ $this->connection = @new PDO($connect, $user, $pass, [PDO::ATTR_PERSISTENT => $persistent]);
$this->connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, $this->pdo_emulate_prepares);
$this->connected = true;
} catch (PDOException $e) {
if (is_bool($old_fields)) {
if ($do_insert) {
$values = array_merge($condition, $fields);
- return $this->insert($table, $values, $do_insert);
+ return $this->replace($table, $values);
}
$old_fields = [];
}