32 lines
531 B
PHP
32 lines
531 B
PHP
<?php
|
|
/**
|
|
* Copyright (c) 2018.
|
|
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
|
* Project name: Battles-Game
|
|
*/
|
|
|
|
class users_row
|
|
{
|
|
private $row;
|
|
|
|
|
|
/**
|
|
* 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();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function result()
|
|
{
|
|
return $this->row;
|
|
}
|
|
} |