tx insert sql fixed

pull/2/head
moneroexamples 7 years ago
parent ddb29ff242
commit e314416587

@ -492,7 +492,8 @@ TxSearch::search()
tx_data.total_sent = total_sent; tx_data.total_sent = total_sent;
tx_data.unlock_time = 0; tx_data.unlock_time = 0;
tx_data.height = searched_blk_no; tx_data.height = searched_blk_no;
tx_data.coinbase = is_coinbase(tx); tx_data.coinbase = is_coinbase;
tx_data.spendable = is_spendable;
tx_data.payment_id = CurrentBlockchainStatus::get_payment_id_as_string(tx); tx_data.payment_id = CurrentBlockchainStatus::get_payment_id_as_string(tx);
tx_data.mixin = get_mixin_no(tx) - 1; tx_data.mixin = get_mixin_no(tx) - 1;
tx_data.timestamp = blk_timestamp_mysql_format; tx_data.timestamp = blk_timestamp_mysql_format;

@ -90,15 +90,14 @@ struct XmrTransaction : public Transactions
)"; )";
static constexpr const char* INSERT_STMT = R"( static constexpr const char* INSERT_STMT = R"(
INSERT IGNORE INTO `Transactions` (`hash`, `prefix_hash` , INSERT IGNORE INTO `Transactions` (`hash`, `prefix_hash`, `account_id`,
`account_id`, `total_received`, `total_received`, `total_sent`, `unlock_time`,
`total_sent`, `unlock_time`, `height`, `height`, `coinbase`, `spendable`,
`coinbase`, `spendable`, `payment_id`, `mixin`, `payment_id`, `mixin`, `timestamp`)
`timestamp`)
VALUES (%0q, %1q, %2q, VALUES (%0q, %1q, %2q,
%3q, %4q, %5q, %3q, %4q, %5q,
%6q, %7q, %8q, %6q, %7q, %8q,
%9q, %10q, , %11q); %9q, %10q, %11q);
)"; )";
static constexpr const char* SUM_XMR_RECIEVED = R"( static constexpr const char* SUM_XMR_RECIEVED = R"(

Loading…
Cancel
Save