get rid of exists(), because rowCount doesn't work consistently

This commit is contained in:
Shish
2019-12-10 01:17:04 +00:00
parent 431d6dd523
commit cb29d07ecc
2 changed files with 1 additions and 16 deletions

View File

@@ -220,21 +220,6 @@ class Database
return $row ? $row : null;
}
/**
* Execute an SQL query and return a boolean based on whether it returns a result
*/
public function exists(string $query, array $args=[], bool $scoreql = false): bool
{
if ($scoreql===true) {
$query = $this->scoreql_to_sql($query);
}
$_start = microtime(true);
$result = $this->execute($query, $args);
$this->count_time("exists", $_start, $query, $args);
return $result->rowCount()>0;
}
/**
* Execute an SQL query and return the first column of each row.
*/