If type and serial no is same I want to add the amount of both row and display in single row
this the image of display the rows:
SELECT SUM(amount),`type`,`account_id` FROM `general_ledger` GROUP BY `type`
I TIRED THIS QUERY it worked but I can't return all column of the table, if I did it showing error of
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\wamp64\www\Vesta\account\report\general_ledger.php on line 104
This Table Structure Table Structure :
I want to SUM of amount by GROUP BY type and return all the rows by condition WHERE account_id = '$account_id' I tried many way I figure it out still I didn't find the solution and reason for error.