Mysqli选择具有相同id和sum的多行然后在PHP中返回

I am having trouble with return sum data in MYSQLI and PHP. Here is my database. Database

For example,i choose user_id = '0', and i need to sum the number in m_debit and deduct m_credit for user_id = '0' to get the final total. The result should be like this:

The total should be appear in Metallic Point column The total should be appear in Metallic Point column

here is my current coding:

$get_member = "select sum (m_debit) from transaction_record_tpg where user_id = 0 ";
$run_customer = mysqli_query($conn,$get_member);
$a = mysqli_num_rows($run_customer);

can you guys help me to get the result?

[Updated] Below is my new coding but it doesnt work

<?php
$get_member = "SELECT SUM(m_debit) - SUM(m_credit) AS   metallic_point FROM transaction_record_tpg WHERE user_id = 0";
$run_customer = mysqli_query($conn,$get_member);
$row = mysqli_fetch_row($run_customer);
?>

<tr>

<td><?php echo $row; ?></td>
<td>2018-10-15 11:03:13</td>
<td>TMA</td>
<td>2018-12-15</td>

</tr><!-- tr Ends -->

Sum both columns and then subtract one of them to deduct it.

SELECT SUM(m_debit) - SUM(m_credit) AS metallic_point
FROM transaction_record_tpg
WHERE user_id = 0

There's no point in calling mysqli_num_rows(). It will always be 1 for this query. Just fetch the row and use $row['metallic_point'] as the value.

$get_member = "SELECT SUM(m_debit) - SUM(m_credit) AS metallic_point FROM transaction_record_tpg WHERE user_id = 0";
$result = mysqli_query($conn, $get_member);
$data = mysqli_fetch_array($result);

echo $data['metallic_point'];