mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
Added support for the "replace" database command
This commit is contained in:
parent
4841ac7dc5
commit
212e06b87b
2 changed files with 41 additions and 0 deletions
|
@ -292,6 +292,20 @@ class DBA
|
|||
return DI::dba()->insert($table, $param, $on_duplicate_update);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace a row of a table
|
||||
*
|
||||
* @param string|array $table Table name or array [schema => table]
|
||||
* @param array $param parameter array
|
||||
*
|
||||
* @return boolean was the insert successful?
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function replace($table, $param)
|
||||
{
|
||||
return DI::dba()->replace($table, $param);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the id of the last insert command
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue