<?php
mysql_select_db($database_sistem, $sistem);
$query_ttl_mei = "SELECT sum(nominal)as rab FROM rab_tb where kode='$_SESSION[kode]' and thn_ajuan='$_SESSION[tahun]' and mei='1' and jenis='Pendapatan'";
$ttl_mei = mysql_query($query_ttl_mei, $sistem) or die(mysql_error());
$row_ttl_mei = mysql_fetch_assoc($ttl_mei);
$totalRows_ttl_mei = mysql_num_rows($ttl_mei);

mysql_select_db($database_sistem, $sistem);
$query_ttl_mei_pnl = "SELECT sum(nominal)as rab FROM rab_tb where kode='$_SESSION[kode]' and thn_ajuan='$_SESSION[tahun]' and mei='1' and jenis='Pengeluaran'";
$ttl_mei_pnl  = mysql_query($query_ttl_mei_pnl , $sistem) or die(mysql_error());
$row_ttl_mei_pnl  = mysql_fetch_assoc($ttl_mei_pnl );
$totalRows_ttl_mei_pnl  = mysql_num_rows($ttl_mei_pnl );

?>
