public static function findCoins($table, $account, $coins, $login) { $sql = "SELECT {$coins} AS coins FROM {$table} WHERE {$account}='{$login}';"; $result = MyDB::mydoAll($sql); if (is_array($result) && count($result)) { return $result[0]["coins"]; } else { return false; } }