I am printing totalbooks
with this code:
$query ="select sum(copies) as totalbooks from booksdetail";
$result=mysqli_query($con, $query);
while($row=mysqli_fetch_array($result)){
echo $row['totalbooks'];
and printing issued books with this code:
$query ="select count(id) as issuedbooks from issue";
$result=mysqli_query($con, $query);
while($row=mysqli_fetch_array($result)){
echo $row['issuedbooks'];
Now, I want to subtract issuedbooks
from totalbooks
.
Which code I should use?