battles/classes/users_row.php

32 lines
531 B
PHP
Raw Normal View History

<?php
/**
* Copyright (c) 2018.
* Author: Igor Barkov <lopar.4ever@gmail.com>
* Project name: Battles-Game
*/
class users_row
{
private $row;
2018-03-03 00:07:27 +00:00
/**
* users_row constructor.
* @param $playerId
*/
public function __construct($playerId)
{
if (!$this->row) {
$this->row = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $playerId)->fetch_assoc();
2018-03-03 00:07:27 +00:00
}
}
2018-03-03 00:07:27 +00:00
/**
2018-03-03 00:07:27 +00:00
* @return array
*/
public function result()
{
return $this->row;
}
}