mirror of
https://github.com/friendica/friendica
synced 2025-04-19 05:50:10 +00:00
Orphans are removed without giant lock problems
This commit is contained in:
parent
abb827b784
commit
fd2d8cc180
4 changed files with 52 additions and 6 deletions
|
@ -108,6 +108,23 @@ class dba {
|
|||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the number of rows
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function num_rows() {
|
||||
if (!$this->result)
|
||||
return 0;
|
||||
|
||||
if ($this->mysqli) {
|
||||
$return = $this->result->num_rows;
|
||||
} else {
|
||||
$return = mysql_num_rows($this->result);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
public function q($sql, $onlyquery = false) {
|
||||
global $a;
|
||||
|
||||
|
@ -126,6 +143,8 @@ class dba {
|
|||
|
||||
$stamp1 = microtime(true);
|
||||
|
||||
$sql = "/*".$a->callstack()." */ ".$sql;
|
||||
|
||||
if($this->mysqli)
|
||||
$result = @$this->db->query($sql);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue