mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-11-15 11:39:13 +03:00
15 lines
308 B
PHP
15 lines
308 B
PHP
|
<?php
|
||
|
namespace App\Models;
|
||
|
use \App\Services\DB;
|
||
|
|
||
|
class User {
|
||
|
|
||
|
public $userid;
|
||
|
function __construct(int $user_id) {
|
||
|
$this->userid = $user_id;
|
||
|
}
|
||
|
public function i($table) {
|
||
|
return DB::query("SELECT * FROM users WHERE id=:id", array(':id'=>$this->userid))[0][$table];
|
||
|
}
|
||
|
|
||
|
}
|