20240406#2
This commit is contained in:
@@ -135,8 +135,9 @@ class MysqlStorage implements MysqlStorageInterface {
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function findOne(string $sql) : array {
|
||||
public function findOne(string $sql) : bool|array {
|
||||
$result = $this->query($sql);
|
||||
if (!$result || $result->num_rows == 0) return false;
|
||||
$data = new MysqlStorageData($result);
|
||||
return $data->fetchOne();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ interface MysqlStorageInterface {
|
||||
* @param string $sql
|
||||
* @return array
|
||||
*/
|
||||
public function findOne(string $sql) : array;
|
||||
public function findOne(string $sql) : bool|array;
|
||||
|
||||
/**
|
||||
* Метод экранирования данных с учетом текущего подключения в т.ч для LIKE
|
||||
|
||||
Reference in New Issue
Block a user