mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
Salmons with Mastodon seem to work now
This commit is contained in:
parent
45d73b106b
commit
35dc56c9c2
8 changed files with 156 additions and 44 deletions
|
@ -634,7 +634,29 @@ class dba {
|
|||
if (is_bool($stmt)) {
|
||||
$retval = $stmt;
|
||||
} else {
|
||||
$retval = (self::rows($stmt) > 0);
|
||||
$retval = (self::num_rows($stmt) > 0);
|
||||
}
|
||||
|
||||
self::close($stmt);
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Fetches the first row
|
||||
*
|
||||
* @param string $sql SQL statement
|
||||
* @return array first row of query
|
||||
*/
|
||||
static public function fetch_first($sql) {
|
||||
$args = func_get_args();
|
||||
|
||||
$stmt = call_user_func_array('self::p', $args);
|
||||
|
||||
if (is_bool($stmt)) {
|
||||
$retval = $stmt;
|
||||
} else {
|
||||
$retval = self::fetch($stmt);
|
||||
}
|
||||
|
||||
self::close($stmt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue