<?php
include('../dbh.php');
$member_id = $_POST['member_id'];
$sql = "SELECT * FROM user_reg WHERE member_id = '$member_id' LIMIT 1";
$sql_deposit = "SELECT SUM(dep_amount) as total_deposit FROM user_deposit WHERE member_id = '$member_id'";
$sql_withdraw = "SELECT SUM(withdraw_amount) as total_withdraw FROM user_withdraw WHERE member_id = '$member_id'";
$d_query = mysqli_query($conn,$sql_deposit);
$deposit = mysqli_fetch_assoc($d_query);
$w_query = mysqli_query($conn,$sql_withdraw);
$withdraw = mysqli_fetch_assoc($w_query);
$query = mysqli_query($conn,$sql);
$data = mysqli_fetch_assoc($query);
$array = ['name'=>$data['member_name'], 'n_id'=>$data['n_id'],'balance'=>$deposit['total_deposit'] - $withdraw['total_withdraw']];
#echo$data['photo'];
//echo $data['member_name'];
echo json_encode($array);
?>
include('../dbh.php');
$member_id = $_POST['member_id'];
$sql = "SELECT * FROM user_reg WHERE member_id = '$member_id' LIMIT 1";
$sql_deposit = "SELECT SUM(dep_amount) as total_deposit FROM user_deposit WHERE member_id = '$member_id'";
$sql_withdraw = "SELECT SUM(withdraw_amount) as total_withdraw FROM user_withdraw WHERE member_id = '$member_id'";
$d_query = mysqli_query($conn,$sql_deposit);
$deposit = mysqli_fetch_assoc($d_query);
$w_query = mysqli_query($conn,$sql_withdraw);
$withdraw = mysqli_fetch_assoc($w_query);
$query = mysqli_query($conn,$sql);
$data = mysqli_fetch_assoc($query);
$array = ['name'=>$data['member_name'], 'n_id'=>$data['n_id'],'balance'=>$deposit['total_deposit'] - $withdraw['total_withdraw']];
#echo$data['photo'];
//echo $data['member_name'];
echo json_encode($array);
?>
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeleteDot Net Training Institute in Chennai | Asp.Net Training in Chennai
Selenium Testing Training in Chennai | Selenium Coaching Institute in Chennai
Software Testing Course in Chennai | Testing Courses in Chennai
Java Training Institute in Chennai | Core Java Training in Chennai | Java Course and Certification
PHP Course in Chennai | PHP Training Institute in Chennai