|
@@ 87-89 (lines=3) @@
|
| 84 |
|
return false; |
| 85 |
|
} |
| 86 |
|
$stmt = $this->mysqli->prepare("INSERT INTO " . $this->getTableName() . " (account_id, currency, coin_address) VALUES (?, ?, ?)"); |
| 87 |
|
if ( $this->checkStmt($stmt) && $stmt->bind_param('iss', $userID, $currency, $address) && $stmt->execute()) { |
| 88 |
|
return true; |
| 89 |
|
} |
| 90 |
|
return $this->sqlError(); |
| 91 |
|
} |
| 92 |
|
|
|
@@ 102-104 (lines=3) @@
|
| 99 |
|
public function remove ($userID, $currency=NULL) { |
| 100 |
|
if ($currency === NULL) $currency = $this->config['currency']; |
| 101 |
|
$stmt = $this->mysqli->prepare("DELETE FROM " . $this->getTableName() . " WHERE account_id = ? AND currency = ?"); |
| 102 |
|
if ( $this->checkStmt($stmt) && $stmt->bind_param('is', $userID, $currency) && $stmt->execute()) { |
| 103 |
|
return true; |
| 104 |
|
} |
| 105 |
|
return $this->sqlError(); |
| 106 |
|
} |
| 107 |
|
|
|
@@ 124-126 (lines=3) @@
|
| 121 |
|
} |
| 122 |
|
if ($this->getCoinAddress($userID) != NULL) { |
| 123 |
|
$stmt = $this->mysqli->prepare("UPDATE " . $this->getTableName() . " SET coin_address = ?, ap_threshold = ? WHERE account_id = ? AND currency = ?"); |
| 124 |
|
if ( $this->checkStmt($stmt) && $stmt->bind_param('sdis', $address, $ap_threshold, $userID, $currency) && $stmt->execute()) { |
| 125 |
|
return true; |
| 126 |
|
} |
| 127 |
|
} else { |
| 128 |
|
$stmt = $this->mysqli->prepare("INSERT INTO " . $this->getTableName() . " (coin_address, ap_threshold, account_id, currency) VALUES (?, ?, ?, ?)"); |
| 129 |
|
if ( $this->checkStmt($stmt) && $stmt->bind_param('sdis', $address, $ap_threshold, $userID, $currency) && $stmt->execute()) { |
|
@@ 129-131 (lines=3) @@
|
| 126 |
|
} |
| 127 |
|
} else { |
| 128 |
|
$stmt = $this->mysqli->prepare("INSERT INTO " . $this->getTableName() . " (coin_address, ap_threshold, account_id, currency) VALUES (?, ?, ?, ?)"); |
| 129 |
|
if ( $this->checkStmt($stmt) && $stmt->bind_param('sdis', $address, $ap_threshold, $userID, $currency) && $stmt->execute()) { |
| 130 |
|
return true; |
| 131 |
|
} |
| 132 |
|
} |
| 133 |
|
return $this->sqlError(); |
| 134 |
|
} |