19 lines
367 B
PHP
19 lines
367 B
PHP
<?php
|
|
|
|
namespace Clan;
|
|
|
|
use Core\Db;
|
|
|
|
class ClanInfo
|
|
{
|
|
public static function isJoinable(string $name): bool
|
|
{
|
|
return Db::getValue('select count(name) from clan where name = ? and status = 1', [$name]) > 0;
|
|
}
|
|
|
|
public static function getNameById(int $id): string
|
|
{
|
|
Db::getValue('select name from clan where id = ?', [$id]);
|
|
}
|
|
}
|