mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:10:15 +00:00
Conversation data is now stored in another table
This commit is contained in:
parent
2e4db2e64e
commit
45d73b106b
5 changed files with 96 additions and 18 deletions
|
@ -492,6 +492,9 @@ class dba {
|
|||
$sql = "/*".$a->callstack()." */ ".$sql;
|
||||
}
|
||||
|
||||
self::$dbo->error = '';
|
||||
self::$dbo->errorno = 0;
|
||||
|
||||
switch (self::$dbo->driver) {
|
||||
case 'pdo':
|
||||
if (!$stmt = self::$dbo->db->prepare($sql)) {
|
||||
|
@ -563,6 +566,10 @@ class dba {
|
|||
break;
|
||||
}
|
||||
|
||||
if (self::$dbo->errorno != 0) {
|
||||
logger('DB Error '.self::$dbo->errorno.': '.self::$dbo->error);
|
||||
}
|
||||
|
||||
$a->save_timestamp($stamp1, 'database');
|
||||
|
||||
if (x($a->config,'system') && x($a->config['system'], 'db_log')) {
|
||||
|
@ -700,6 +707,23 @@ class dba {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Insert a row into a table
|
||||
*
|
||||
* @param string $table Table name
|
||||
* @param array $param parameter array
|
||||
*
|
||||
* @return boolean was the insert successfull?
|
||||
*/
|
||||
static public function insert($table, $param) {
|
||||
$sql = "INSERT INTO `".$table."` (`".implode("`, `", array_keys($param))."`) VALUES (".
|
||||
substr(str_repeat("?, ", count($param)), 0, -2).");";
|
||||
|
||||
$sql = self::replace_parameters($sql, $param);
|
||||
|
||||
return self::e($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Closes the current statement
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue