Permalink
Browse files

Update completed.php

Refactor to blockchain_transactions table and replace boolean finished true with 1.
  • Loading branch information...
whotooktwarden committed Mar 2, 2016
1 parent e2b1136 commit e91f3e0ac147254c4f206ef190d99fe22ea8e238
Showing with 2 additions and 2 deletions.
  1. +2 −2 completed.php
@@ -7,7 +7,7 @@
//Use a while loop to print each line by ID then append with the newline character
//assign SQL to a variable for query execution
$sql = "SELECT id, crypto_symbol, crypto_address, external_address, direction, timestamp, finished FROM coin_index WHERE finished = true;";
$sql = "SELECT id, crypto_symbol, crypto_address, external_address, is_inbound, rc_timestamp, finished, bc_blockhash, bc_amount, bc_txid FROM blockchain_transactions WHERE finished = 1 AND bc_txid IS NOT NULL;";
//connect to the database, execute the $sql, store the returned array within $result
//script exits gracefully if connection cannot be established
@@ -21,7 +21,7 @@
while($row = $result->fetch_assoc()) {
echo "id: " . $row["id"]. " - Crypto Symbol: " . $row["crypto_symbol"]. " - Cryptocurrency Address: " . $row["crypto_address"].
" - External Address: " . $row["external_address"].
" - Time-stamp: " . $row["timestamp"]. " - Direction: " . $row["direction"]. " - Finished: " . $row["finished"]. "<br />";
" - Time-stamp: " . $row["rc_timestamp"]. " - Is Inbound: " . $row["is_inbound"]. " - Finished: " . $row["finished"]. " - Blockhash: ". $row["bc_blockhash"]. " Amount: " . $row["bc_txid"]. " TxID: " . $row["bc_txid"]. "<br />";
}
} else {
//else there were no results, notify RC operator

0 comments on commit e91f3e0

Please sign in to comment.