Orphans are removed without giant lock problems

This commit is contained in:
Michael Vogel 2016-10-20 22:05:21 +00:00
parent abb827b784
commit fd2d8cc180
4 changed files with 52 additions and 6 deletions

View file

@ -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