当前位置: 首页>>代码示例>>PHP>>正文


PHP jsonRPCClient::sc_getreceivedbyaddress方法代码示例

本文整理汇总了PHP中jsonRPCClient::sc_getreceivedbyaddress方法的典型用法代码示例。如果您正苦于以下问题:PHP jsonRPCClient::sc_getreceivedbyaddress方法的具体用法?PHP jsonRPCClient::sc_getreceivedbyaddress怎么用?PHP jsonRPCClient::sc_getreceivedbyaddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jsonRPCClient的用法示例。


在下文中一共展示了jsonRPCClient::sc_getreceivedbyaddress方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SUM

     $row_transfer_deposit_address_a = mysql_fetch_assoc($rlt_transfer_deposit_address_a);
     if ($row_transfer_deposit_address_a["user"] != $user_id) {
         json_error("Invalid id");
     }
     brief_check();
     $slt_transfer_deposit_a = "SELECT SUM(amount) AS amount FROM transfer_deposit WHERE deposit_address = '{$id}'";
     $rlt_transfer_deposit_a = mysql_query($slt_transfer_deposit_a);
     $row_transfer_deposit_a = mysql_fetch_assoc($rlt_transfer_deposit_a);
     $total_amount = $row_transfer_deposit_a["amount"];
     $slt_transfer_deposit_b = "SELECT SUM(amount) AS amount FROM transfer_deposit WHERE deposit_address = '{$row_transfer_deposit_address_a['id']}' AND type = 'extern'";
     $rlt_transfer_deposit_b = mysql_query($slt_transfer_deposit_b);
     $row_transfer_deposit_b = mysql_fetch_assoc($rlt_transfer_deposit_b);
     $total_amount_extern = $row_transfer_deposit_b["amount"];
     $udt_transfer_deposit_address_a = "UPDATE transfer_deposit_address SET last_check_amount = '{$total_amount}' WHERE id = {$row_transfer_deposit_address_a['id']}";
     mysql_query($udt_transfer_deposit_address_a);
     $pending_amount = $solidcoin->sc_getreceivedbyaddress("main", $row_transfer_deposit_address_a["address"], 0) / 10000 - $total_amount_extern;
     $new_amount = $total_amount - $row_transfer_deposit_address_a["last_check_amount"];
     json_success(array("address" => $row_transfer_deposit_address_a["address"], "group" => $row_transfer_deposit_address_a["group"], "send_mail" => $row_transfer_deposit_address_a["send_mail"], "callback" => $row_transfer_deposit_address_a["callback"], "data" => $row_transfer_deposit_address_a["data"], "total_amount" => api_sc_format($total_amount), "pending_amount" => api_sc_format($pending_amount), "new_amount" => api_sc_format($new_amount)));
 }
 if (isset($_GET["a"])) {
     // 4.1.3 Get deposit address info by address
     $address = mysql_real_escape_string($_GET["a"], $db);
     //mysql_query("LOCK TABLES transfer_deposit_address WRITE, transfer_deposit WRITE, transaction WRITE");
     $slt_transfer_deposit_address_a = "SELECT * FROM transfer_deposit_address WHERE address = '{$address}'";
     $rlt_transfer_deposit_address_a = mysql_query($slt_transfer_deposit_address_a);
     $row_transfer_deposit_address_a = mysql_fetch_assoc($rlt_transfer_deposit_address_a);
     if ($row_transfer_deposit_address_a["user"] != $user_id) {
         json_error("Invalid address");
     }
     brief_check();
     $slt_transfer_deposit_a = "SELECT SUM(amount) AS amount FROM transfer_deposit WHERE deposit_address = '{$row_transfer_deposit_address_a['id']}'";
开发者ID:rhartness,项目名称:slc24,代码行数:31,代码来源:api.php


注:本文中的jsonRPCClient::sc_getreceivedbyaddress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。