updated user class, removed hashrate and added getTableName
This commit is contained in:
parent
9b961e04cf
commit
1390c12a5d
@ -162,15 +162,16 @@ class User {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTableName() {
|
||||||
|
return $this->table;
|
||||||
|
}
|
||||||
|
|
||||||
public function getUserData($userID) {
|
public function getUserData($userID) {
|
||||||
$this->debug->append("Fetching user information for user id: $userID");
|
$this->debug->append("Fetching user information for user id: $userID");
|
||||||
$stmt = $this->mysqli->prepare("
|
$stmt = $this->mysqli->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
id, username, pin, pass, admin,
|
id, username, pin, pass, admin,
|
||||||
IFNULL(donate_percent, '0') as donate_percent, coin_address, ap_threshold,
|
IFNULL(donate_percent, '0') as donate_percent, coin_address, ap_threshold,
|
||||||
(
|
|
||||||
SELECT ROUND(COUNT(id) * POW(2,21)/600/1000) FROM shares WHERE $this->table.username = SUBSTRING_INDEX( `username` , '.', 1 ) AND time > DATE_SUB(now(), INTERVAL 10 MINUTE)
|
|
||||||
) AS hashrate,
|
|
||||||
(
|
(
|
||||||
SELECT COUNT(id)
|
SELECT COUNT(id)
|
||||||
FROM shares
|
FROM shares
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user