- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
function get_user_name($id) {
$query = "
SELECT name
FROM users
WHERE id = '".$id."'
";
$this->registry['sql']->query($query);
if ($this->registry['sql']->getNumberRows()>0) {
$result = $this->registry['sql']->getFetchObject();
return $result[0]->name;
}
}
function get_user_login($id) {
$query = "
SELECT login
FROM users
WHERE id = '".$id."'
";
$this->registry['sql']->query($query);
if ($this->registry['sql']->getNumberRows()>0) {
$result = $this->registry['sql']->getFetchObject();
return $result[0]->login;
}
}
function get_user_password($id) {
$query = "
SELECT password
FROM users
WHERE id = '".$id."'
";
$this->registry['sql']->query($query);
if ($this->registry['sql']->getNumberRows()>0) {
$result = $this->registry['sql']->getFetchObject();
return $result[0]->password;
}
}
function get_user_role($id) {
$query = "
SELECT role
FROM users
WHERE id = '".$id."'
";
$this->registry['sql']->query($query);
if ($this->registry['sql']->getNumberRows()>0) {
$result = $this->registry['sql']->getFetchObject();
return $result[0]->role;
}
}
function get_user_adress($id) {
$query = "
SELECT adress
FROM users
WHERE id = '".$id."'
";
$this->registry['sql']->query($query);
if ($this->registry['sql']->getNumberRows()>0) {
$result = $this->registry['sql']->getFetchObject();
return $result[0]->adress;
}
}
function get_user_valuta($id) {
$query = "
SELECT valuta
FROM users
WHERE id = '".$id."'
";
$this->registry['sql']->query($query);
if ($this->registry['sql']->getNumberRows()>0) {
$result = $this->registry['sql']->getFetchObject();
return $result[0]->valuta;
}
}
function get_room_type($id){
$query = "
SELECT type
FROM rooms
WHERE id = '".$id."'
";
$this->registry['sql']->query($query);
if ($this->registry['sql']->getNumberRows()>0) {
$result = $this->registry['sql']->getFetchObject();
return $result[0]->type;
}
}
Lure Of Chaos 29.08.2011 11:11 # +2
roman-kashitsyn 29.08.2011 11:16 # +3
striker 29.08.2011 12:05 # 0
vkontakte 29.08.2011 12:26 # +1
Lure Of Chaos 29.08.2011 12:40 # 0
vkontakte 29.08.2011 12:45 # 0
Хотя наверное оно и к лучшему, такое показывать людям нельзя =)
ling 29.08.2011 12:30 # 0
vkontakte 29.08.2011 12:33 # +1
Внимание! Код далее - модель в MVC
roman-kashitsyn 29.08.2011 12:36 # 0
I have nothing more to say
Lure Of Chaos 29.08.2011 12:41 # +2
vkontakte 29.08.2011 12:44 # 0
Lure Of Chaos 29.08.2011 12:46 # +2
обидно, когда кидают на поддержку высера юниора
guest8 09.04.2019 11:24 # −999