-2

I am new in PHP I want to know how to create general ledger.
I have two tables invoice and payment received.

I want to create general ledger using both tables.

mysql_query("select * from invoice");
mysql_query("select * from invoice");
user3942918
  • 25,539
  • 11
  • 55
  • 67
Hani Mehdi
  • 187
  • 4
  • 9
  • 1
    Lookup "how to ask a question" on stackoverflow for important guidelines. – Sloan Thrasher Apr 11 '17 at 01:45
  • Warning: The `mysql_*` functions are [no longer supported or maintained](https://stackoverflow.com/questions/12859942). They were [deprecated in PHP 5.5.0](https://wiki.php.net/rfc/mysql_deprecation) and [removed in PHP 7.0.0](https://php.net/manual/en/function.mysql-connect.php#function.mysql-connect-refsynopsisdiv). You are strongly encouraged to migrate to either [MySQLi](https://php.net/manual/en/book.mysqli.php) or [PDO_MySQL](https://php.net/manual/en/ref.pdo-mysql.php). – Pang Apr 11 '17 at 02:23

1 Answers1

0

Maybe you want to count the total, you can do it like this:

$total = mysql_query("SELECT count(money) as total FROM invoice");//your query string
$res = mysql_fetch_array($total);
$count = $res['total']; //statistics
zhm
  • 3,513
  • 3
  • 34
  • 55
ivan
  • 16